Re: completely stumped by ereg()

From: Date: Sun, 30 Nov 2003 00:07:16 +0000
Subject: Re: completely stumped by ereg()
Groups: php.general 
Request: Send a blank email to php-general+get-171372@lists.php.net to get a copy of this message
You should try var_dump(ereg('C:\\\\W', 'C:\\WINNT\\TEMP\tst5B.tmp')); The reason is that in simple quotes, antislashes don't have to be escaped. Still, they need to be escaped in a regular epr ie in the first argument of ereg() (the first and the secon argument are both string, but in the reakity they are not really the same type) > Why doesn't this match? > > var_dump(ereg('C:\\\\W', 'C:\\\\WINNT\\\\TEMP\\tst5B.tmp')); > > should print int(1), prints bool(false) > > Thanks, > Greg > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#171372) next »