Hi, can anyone help me to debug the syntax below:
<pre>if (eregi(((.*)+[0-9a-z]+$), $user_details['mbs_username'], $reg)) { ......... ..... }
</pre>
It keep on prompt me this line got syntax error.
Thanks. Louis
ereg is not my thing but I'm pretty sure your line should look like this
if (eregi("((.*)+[0-9a-z]+$"), $user_details['mbs_username'], $reg))
Try it, ' Nick
Indeed. the pattern is a string, so it must be quoted.
PS ^ means 'start of string' so there can be nothing before this character (unless you can somehow put a character in a string before the start of the string :-) )