Re: [PHP] completely stumped by ereg()
sophie_at_sitadelle.com
Date: 11/30/03
- Next message: orlandopozo_at_icnet.com.ve: "Problem in the output of an array"
- Previous message: Greg Beaver: "completely stumped by ereg()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Nov 2003 01:07:16 +0100 (CET) To: <php-general@lists.php.net>
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
- Next message: orlandopozo_at_icnet.com.ve: "Problem in the output of an array"
- Previous message: Greg Beaver: "completely stumped by ereg()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|