Re: (another) regex difficulty
| From: | jonas_weber @ gmx . ch | Date: | Thu, 02 Oct 2003 08:30:13 +0000 |
| Subject: | Re: (another) regex difficulty | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164705@lists.php.net to get a copy of this message | ||
Am Donnerstag, 02.10.03 um 01:37 Uhr schrieb Cristian Lavaque:
doh, I now understand your question, you don't mean the asterisk literally, but as any character that follows a backslash... sorry -_-that's right ;) -- anyway, thanks for your effort! my problem was that i misunderstood the escape-the-meta-char-idea (see below). Am Mittwoch, 01.10.03 um 23:23 Uhr schrieb Curt Zirzow:
'\\' always gets translated to '\' So the string:
'/(\\)/' translates to '/(\)/' which is an invalid regex, you'll get a complaint about unclosed paren.this is also a bit tricky:
echo "beg \\ end\n"; echo "beg \ end\n";
c) Why do I hate regular expressions so much?perhaps because you're using them wrong. klugscheisser ;)
I've answered all 5 of em so far. thanks, your answers helped a lot!- jns