为啥要去掉php 有对应函数
http://php.net/str_getcsv
昂,已经弄了个php版本的处理了
<?php
function fucking_aliyun_rds($line){
if(!$line) return;
$line=(string)$line;
$pattern='/^\"\d{1,5}\"/';
$int=$replacement=false;
if(preg_match($pattern, $line, $matches)){
$int=(int)str_replace('"', '', $matches[0]);
}else{
return $line;
}
if($int){
$replacement = $int;
$line=preg_replace('""', '',$line);
$b=preg_replace($pattern, $replacement, $line);
}
$b.="\t";
return $b;
}
$f = fopen ("wp_users.txt", "r");
$ln= 0;
while (! feof ($f)) {
$line= fgets ($f);
/* ++$ln;/
/printf ( $ln);*/
if ($line===FALSE) {
}
else{
$a=fucking_aliyun_rds($line);
echo $a;
}
}
fclose ($f);