Page 1 of 1

FscanF - reg. expressions?

Posted: Mon Jul 08, 2002 3:31 pm
by QWERTY
File.txt:

Code: Select all

something- something		something	some thing 
something- something		something	some thing 
something- something		something	some thing
Scan.php :

Code: Select all

while ($abc = fscanf ($fd , "%s\t%s\t%s\n" )){
list...
..... code continues ...

}
As you can see, file.txt contains some text, and there are some whitespaces in it. But (on 1st line) there is "something- something". Some text, than "-", whitespace, and again some text. Now i would like to select everything with %s, but it doesent work...
Anyone know the solution?

BTW: There is a way to put regular expressions in "search format", right? How?