RE: [PHP] Regular Expression

From: Date: Wed, 05 May 2004 13:27:44 +0000
Subject: RE: [PHP] Regular Expression
Groups: php.general 
Request: Send a blank email to php-general+get-185421@lists.php.net to get a copy of this message
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 Stanley.G.Martin@mail.sprint.com -----Original Message----- From: Tumurbaatar S. [mailto:tumurbaatar@datacom.mn] Sent: Wednesday, May 05, 2004 12:26 AM To: php-general@lists.php.net 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

« previous php.general (#185421) next »