Documentation update.
This commit is contained in:
parent
ac4ab7186d
commit
f006fa5e3c
|
@ -1907,6 +1907,7 @@ group can match. Suppose you want to match the name of a weekday, either as a
|
||||||
3-letter abbreviation or as the full name, and in both cases you want to
|
3-letter abbreviation or as the full name, and in both cases you want to
|
||||||
extract the abbreviation. This pattern (ignoring the line breaks) does the job:
|
extract the abbreviation. This pattern (ignoring the line breaks) does the job:
|
||||||
<pre>
|
<pre>
|
||||||
|
(?J)
|
||||||
(?<DN>Mon|Fri|Sun)(?:day)?|
|
(?<DN>Mon|Fri|Sun)(?:day)?|
|
||||||
(?<DN>Tue)(?:sday)?|
|
(?<DN>Tue)(?:sday)?|
|
||||||
(?<DN>Wed)(?:nesday)?|
|
(?<DN>Wed)(?:nesday)?|
|
||||||
|
@ -1927,7 +1928,7 @@ they appear in the overall pattern. The first one that is set is used for the
|
||||||
reference. For example, this pattern matches both "foofoo" and "barbar" but not
|
reference. For example, this pattern matches both "foofoo" and "barbar" but not
|
||||||
"foobar" or "barfoo":
|
"foobar" or "barfoo":
|
||||||
<pre>
|
<pre>
|
||||||
(?:(?<n>foo)|(?<n>bar))\k<n>
|
(?J)(?:(?<n>foo)|(?<n>bar))\k<n>
|
||||||
|
|
||||||
</PRE>
|
</PRE>
|
||||||
</P>
|
</P>
|
||||||
|
|
|
@ -467,7 +467,7 @@ Changes of these options within a group are automatically cancelled at the end
|
||||||
of the group.
|
of the group.
|
||||||
<pre>
|
<pre>
|
||||||
(?i) caseless
|
(?i) caseless
|
||||||
(?J) allow duplicate names
|
(?J) allow duplicate named groups
|
||||||
(?m) multiline
|
(?m) multiline
|
||||||
(?n) no auto capture
|
(?n) no auto capture
|
||||||
(?s) single line (dotall)
|
(?s) single line (dotall)
|
||||||
|
|
|
@ -7678,6 +7678,7 @@ NAMED CAPTURE GROUPS
|
||||||
and in both cases you want to extract the abbreviation. This pattern
|
and in both cases you want to extract the abbreviation. This pattern
|
||||||
(ignoring the line breaks) does the job:
|
(ignoring the line breaks) does the job:
|
||||||
|
|
||||||
|
(?J)
|
||||||
(?<DN>Mon|Fri|Sun)(?:day)?|
|
(?<DN>Mon|Fri|Sun)(?:day)?|
|
||||||
(?<DN>Tue)(?:sday)?|
|
(?<DN>Tue)(?:sday)?|
|
||||||
(?<DN>Wed)(?:nesday)?|
|
(?<DN>Wed)(?:nesday)?|
|
||||||
|
@ -7697,7 +7698,7 @@ NAMED CAPTURE GROUPS
|
||||||
is set is used for the reference. For example, this pattern matches
|
is set is used for the reference. For example, this pattern matches
|
||||||
both "foofoo" and "barbar" but not "foobar" or "barfoo":
|
both "foofoo" and "barbar" but not "foobar" or "barfoo":
|
||||||
|
|
||||||
(?:(?<n>foo)|(?<n>bar))\k<n>
|
(?J)(?:(?<n>foo)|(?<n>bar))\k<n>
|
||||||
|
|
||||||
|
|
||||||
If you make a subroutine call to a non-unique named group, the one that
|
If you make a subroutine call to a non-unique named group, the one that
|
||||||
|
@ -10629,7 +10630,7 @@ OPTION SETTING
|
||||||
the end of the group.
|
the end of the group.
|
||||||
|
|
||||||
(?i) caseless
|
(?i) caseless
|
||||||
(?J) allow duplicate names
|
(?J) allow duplicate named groups
|
||||||
(?m) multiline
|
(?m) multiline
|
||||||
(?n) no auto capture
|
(?n) no auto capture
|
||||||
(?s) single line (dotall)
|
(?s) single line (dotall)
|
||||||
|
|
|
@ -1907,6 +1907,7 @@ group can match. Suppose you want to match the name of a weekday, either as a
|
||||||
3-letter abbreviation or as the full name, and in both cases you want to
|
3-letter abbreviation or as the full name, and in both cases you want to
|
||||||
extract the abbreviation. This pattern (ignoring the line breaks) does the job:
|
extract the abbreviation. This pattern (ignoring the line breaks) does the job:
|
||||||
.sp
|
.sp
|
||||||
|
(?J)
|
||||||
(?<DN>Mon|Fri|Sun)(?:day)?|
|
(?<DN>Mon|Fri|Sun)(?:day)?|
|
||||||
(?<DN>Tue)(?:sday)?|
|
(?<DN>Tue)(?:sday)?|
|
||||||
(?<DN>Wed)(?:nesday)?|
|
(?<DN>Wed)(?:nesday)?|
|
||||||
|
@ -1926,7 +1927,7 @@ they appear in the overall pattern. The first one that is set is used for the
|
||||||
reference. For example, this pattern matches both "foofoo" and "barbar" but not
|
reference. For example, this pattern matches both "foofoo" and "barbar" but not
|
||||||
"foobar" or "barfoo":
|
"foobar" or "barfoo":
|
||||||
.sp
|
.sp
|
||||||
(?:(?<n>foo)|(?<n>bar))\ek<n>
|
(?J)(?:(?<n>foo)|(?<n>bar))\ek<n>
|
||||||
.sp
|
.sp
|
||||||
.P
|
.P
|
||||||
If you make a subroutine call to a non-unique named group, the one that
|
If you make a subroutine call to a non-unique named group, the one that
|
||||||
|
|
|
@ -441,7 +441,7 @@ Changes of these options within a group are automatically cancelled at the end
|
||||||
of the group.
|
of the group.
|
||||||
.sp
|
.sp
|
||||||
(?i) caseless
|
(?i) caseless
|
||||||
(?J) allow duplicate names
|
(?J) allow duplicate named groups
|
||||||
(?m) multiline
|
(?m) multiline
|
||||||
(?n) no auto capture
|
(?n) no auto capture
|
||||||
(?s) single line (dotall)
|
(?s) single line (dotall)
|
||||||
|
|
Loading…
Reference in New Issue