Re: Exclusion in Regex not working
| From: | Chris Hayes | Date: | Fri, 31 Jan 2003 13:22:14 +0000 |
| Subject: | Re: Exclusion in Regex not working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-133764@lists.php.net to get a copy of this message | ||
At 14:11 31-1-2003, you wrote:
So I'm using ereg(pattern, input) to see if the pattern matches or not. SO for exclusion I build the following pattern [^$] and pass it to ereg above. So if the input includes a $ the ereg should return false and the processing shouldn't take place. Well the thing is for $pattern = '[^$]' it doesn't work. Input including '$' is still passed to the allowed stuff code block. I remember something like $ had to be double escaped like \\$