Here's a neat little tool I came across while taking an ASP.NET course
at a local college for creating regular expressions. I've used it with
my Perl/PHP scripting also. 

Regular Expression Designer
http://www.radsoftware.com.au/web/Default.aspx


Stanley G. Martin
System Administrator
Sprint - EAS Business Intelligence 
[EMAIL PROTECTED]


-----Original Message-----
From: Tumurbaatar S. [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 05, 2004 12:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Regular Expression

There's an input string like "{str1,str2,...,strN}". I want to capture
all these strings and due to complexity of them I use a preg_match_all()
instead of simple split. A pattern for the matching strings is ready but
I cannot imagine how to specify that strings are separated by commas
and the last one is not followed by comma. For example, I'm afraid that
this pattern "/^{(?:(pattern),)*|(pattern)?}$/" can match and capture
properly constructed input string, but, in addition, this matches if
the string end is ",}". Any ideas?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to