Method Regexp.PCRE.Plain()->split2()


Method split2

array(string)|int(0) split2(string subject, void|int startoffset)

Description

Matches a subject against the pattern, returns an array where the first element are the whole match, and the subsequent are the matching subpatterns. Returns 0 if there was no match.

example:

> Regexp.PCRE.Plain("i\(.*\) is \(.*\)u")->split2("pike is fun");
Result: ({
             "ike is fu",
             "ke",
             "f"
         })