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


Method matchall

this_program matchall(string subject, function(array(string)|void:mixed|void) callback)

Description

Will give a callback for each match in a subject. Called arguments will be matching patterns and subpatterns in an array and as second argument the exec result array.

returns called object

example: > Regexp.PCRE("b(a*)([^-\1234]*)(\1234*)m") ->matchall("abam-boom-fooabado\1234m", lambda(mixed s) { werror("%O\n",s); return "gurka"; }); ({ /* 4 elements */ "bam", "a", "", "" }) ({ /* 4 elements */ "boom", "", "oo", "" }) ({ /* 4 elements */ "bado\1234m", "a", "do", "\1234" }) Result: Regexp.PCRE.StudiedWidestring("b(a*)([^-Ê\234]*)(Ê\234*)m")