Page 1 of 1
PCRE - I need an explanation...
Posted: Sun Jul 04, 2004 2:52 pm
by evilmonkey
Hello. I don't really get the PCRE pattern syntax, even after reading this page (
http://ca2.php.net/manual/en/pcre.pattern.syntax.php). Can someone please explain what the syntax does? Too many characters, and it just doesn't make sense.
Thanks.

Posted: Sun Jul 04, 2004 3:23 pm
by markl999
Entire books have been written on regular expressions so it's not something that a forum post can cover. Best to search google for 'regular expressions tutorial' and spend as many years as possible reading about them

Posted: Sun Jul 04, 2004 6:07 pm
by McGruff
It's entirely normal to find regex confusing - it was invented by evil madmen for this very purpose. Regex possibly gets the world record as the language with the most meaning condensed into the smallest space.
This handy tool is very useful for trying out expressions:
http://www.weitz.de/regex-coach/#install.
Posted: Sun Jul 04, 2004 7:44 pm
by redmonkey
The GPL'd QT sources has a little regex checker in the examples directory. It is not fully featured but it's quick and handy for double checking small snippets.
Posted: Sun Jul 04, 2004 9:09 pm
by evilmonkey
Thanks everyone, I'm currently trying out the tool that McGruff suggested...I'll ask if there's anything specific. I thought there'd be a straigh-forward answer...
Posted: Mon Jul 05, 2004 10:02 pm
by tim
evilmonkey wrote:I thought there'd be a straigh-forward answer...
dont we all wish
