Extracted from Pike v7.6 release 61 at 2005-12-30.
pike.ida.liu.se
[Top]
Regexp
Regexp.PCRE
Regexp.PCRE._Regexp_PCRE
Regexp.PCRE._Regexp_PCRE.Plain

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


Method split2

array(string)|int(0..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" })