|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-01-09 03:53 UTC] sam at ananova dot com
[2001-01-09 04:19 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 07:00:01 2025 UTC |
if (eregi('^(ab|)c$',$x)) print "blah: $x<br>\n"; complains with Warning: REG_EMPTY in /usr/local/ananova_v2/www/search/_index.php on line 31 and returns false regardless of $x yet: echo "c" | egrep '^(ab|)c$' echo "ac" | egrep '^(ab|)c$' echo "abc" | egrep '^(ab|)c$' outputs: c abc Removing the from my php expression | stops the complaint but ruins the pattern. My pattern intends to read (in english) Optionally prefixed by "ab" and matches "c" exactly.