我目前在一个txt文件中有几百个文件路径需要strim,在文本文件中划线(Windows)
report2011510222820.html: <td width="60%" bgcolor="#f4f4f4" class="tablebody" valign="top">C:\Users\Administrator\Desktop\calc.exe</td>
我怎么能拿出 “report2011510222820.html: <td width="60%" bgcolor="#f4f4f4" class="tablebody" valign="top">" and "</td>
”,所以我只留下了:
C:\Users\Administrator\Desktop\calc.exe
当前的代码,我有:
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
char s[2048];
while (fgets(s, sizeof(s), stdin))
{
char *pos = strpbrk(s, "|\r\n");
if (pos != 0)
fputs(pos+1, stdout);
}
return 0;
}
'的#include 的#include INT主(INT的argc,字符* argv的[]){ 炭 S [2048]; (fgets(s,sizeof(s),stdin)) char * pos = strpbrk(s,“| \ r \ n”);如果(pos!= 0) fputs(pos + 1,stdout); } return 0; } ' –
Den
2011-05-10 23:13:53
这就是我现在的代码 – Den 2011-05-10 23:14:18
@pavium嗨,我认为有人为我编辑过 – Den 2011-05-10 23:24:56