View Single Post
Old Jul 20th, 2004, 11:32 PM   #5
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
Yeah, I know that PHP generally tends to hold the following statements true:

'0' = 0 = "0" = flase and
'1' = n = "n" = true (for n = (0,oo])

And what I did to insure that there were no errors in my original source code is I stucka print statement infront of preg_match which resulted in a 0, I just wanted to make sure that PHP was not formatting my FALSE to a 0 before printing it out, so I threw that in there to check when I wrote that test script.

I still find the problem to illude me, according to the Perl Regexp guide, the character '.' should match *ANY* character, but for some reason it was refusing to match one of the viewable characters in the string I included in that script (posted above). The solution [.\w\W\s\S]* is not a nice one, but it does work.. however redundant it may actually be. I do not see this is posing as a performance hit however since '.' would have been evaluated much the same as the character class I provided.

Perhaps this is a bug in PHP4? Or perhaps I am just misinformed on the use of the '.' character class. In any case, the script I was debugging for the last two days is now much closer to being debugged, lol.
__________________
Clifford Matthew Roche <geek@cliffordroche.com>
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote