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()->split()


Method split

array(string)|int(0..0) split(string subject, void|int startoffset)

Description

Matches a subject against the pattern, compatible with the old split method: returns an array of the subpatterns, or if there are no subpattern but still a match, ({0}). Returns 0 if there was no match.

example: > Regexp.PCRE.Plain("i\(.*\) is \(.*\)u")->split("pike is fun"); (1) Result: ({ "ke", "f" }) > Regexp.PCRE.Plain("is fun")->split("pike is fun"); (4) Result: ({ 0 })