Help with regular expressions
| From: | José Daniel Ramos Wey | Date: | Fri, 25 Jan 2002 01:00:13 +0000 |
| Subject: | Help with regular expressions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-82024@lists.php.net to get a copy of this message | ||
Hi! I´m new to regular expressions, and it seems to be an art to make it
work as expected.
I´m trying to remove all "single-line" comments from an string - that´s
everything after "//" to the end of a line. I expected that this would do
the job: ereg_replace("//[[:alnum:]]*\n","",$string), but it didn´t work.
Any tips?
TIA,
Daniel Wey