ereg($var1."|", $var2) --> What's wrong with it?,.., | (pipe) gi ves an error...

From: Date: Wed, 06 Sep 2000 11:52:13 +0000
Subject: ereg($var1."|", $var2) --> What's wrong with it?,.., | (pipe) gi ves an error...
Groups: php.general 
Request: Send a blank email to php-general+get-15495@lists.php.net to get a copy of this message
Hi, maybe it is obvious or something, but I cannot understand why ereg($var1."|", $var2) and $var1=$var1.'|'; ereg($var1, $var2) don't work giving me the message: Warning: REG_EMPTY in test.php on line 65 while ereg($var1, $var2) and $var1=$var1; ereg($var1, $var2) working perfectly? I use pipe as a separator, and I though it is nothing else then a character... but here... in ereg()... strange things ARE happening... I guess that ( | ) cannot be used in ereg() (and maybe anywhere else?) even as a string in single quotes... I mean even echo '$a_variable<br>'; would output $a_variable<br> just as it reads above, single quotes are NOT parsed, are they? why ' | ' ? Thanks in Advance... Maxim Maletsky - maxim@j-door.com <mailto:maxim@j-door.com> Webmaster, J-Door.com / J@pan Inc. LINC Media, Inc. TEL: 03-3499-2175 x 1271 FAX: 03-3499-3109 http://www.j-door.com <http://www.j-door.com/> http://www.japaninc.net <http://www.japaninc.net/> http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/>

« previous php.general (#15495) next »