File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1311
1311
rest of the main pattern as well as the alternative in the
1312
1312
subpattern.
1313
1313
</para >
1314
+ <para >
1315
+ It is possible to record which alternative was matched by using
1316
+ <literal >(*MARK:NAME)</literal > or <literal >(*:NAME)</literal >.
1317
+ Any number of such <literal >(*MARK)</literal > verbs may appear and their
1318
+ names do not have to be unique. When a match succeeds, the name of the
1319
+ last-encountered <literal >(*MARK:NAME)</literal > will be placed among
1320
+ matches as if it were a capture group called <literal >MARK</literal > so it
1321
+ can be read from the <parameter >matches</parameter > of
1322
+ <function >preg_match</function > and will be passed to the
1323
+ <parameter >callback</parameter > of <function >preg_match_all</function > etc.
1324
+ </para >
1314
1325
</section >
1315
1326
1316
1327
<section xml : id =" regexp.reference.internal-options" >
You can’t perform that action at this time.
0 commit comments