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

Reply via email to