программа для тестирования регулярных выражений, совместимых с Perl (a program for testing Perl-compatible regular expressions.)
OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION
When the alternative matching function, pcre[16|32]_dfa_exec()
,
is used (by means of the \D escape sequence or the -dfa
command
line option), the output consists of a list of all the matches
that start at the first point in the subject where there is at
least one match. For example:
re> /(tang|tangerine|tan)/
data> yellow tangerine\D
0: tangerine
1: tang
2: tan
(Using the normal matching function on this data finds only
"tang".) The longest matching string is always given first (and
numbered zero). After a PCRE_ERROR_PARTIAL return, the output is
"Partial match:", followed by the partially matching substring.
(Note that this is the entire substring that was inspected during
the partial match; it may include characters before the actual
match start if a lookbehind assertion, \K, \b, or \B was
involved.)
If /g
is present on the pattern, the search for further matches
resumes at the end of the longest match. For example:
re> /(tang|tangerine|tan)/g
data> yellow tangerine and tangy sultana\D
0: tangerine
1: tang
2: tan
0: tang
1: tan
0: tan
Since the matching function does not support substring capture,
the escape sequences that are concerned with captured substrings
are not relevant.