ereg not working with wildcards?
Posted: Mon Jul 11, 2005 11:31 am
This is really strange... ereg is supposed to be able to find a match of a regular expression inside a string, right? And wildcards can be used in regular expressions as *, right? So how come when I do this:
It always gives this error:
Warning: ereg(): REG_BADRPT:.repetition-operator operand invalid??
-IMP

Code: Select all
ereg("*hello*",$mystring,$mymatches);Warning: ereg(): REG_BADRPT:.repetition-operator operand invalid??
-IMP