Fix some documentation typos.

This commit is contained in:
Philip.Hazel 2021-06-14 10:53:18 +00:00
parent a5389db88d
commit d70da76dfb
10 changed files with 68 additions and 66 deletions

View File

@ -2643,10 +2643,10 @@ lookbehind. For example, consider the pattern
</pre> </pre>
which finds occurrences of "iss" in the middle of words. (\B matches only if which finds occurrences of "iss" in the middle of words. (\B matches only if
the current position in the subject is not a word boundary.) When applied to the current position in the subject is not a word boundary.) When applied to
the string "Mississipi" the first call to <b>pcre2_match()</b> finds the first the string "Mississippi" the first call to <b>pcre2_match()</b> finds the first
occurrence. If <b>pcre2_match()</b> is called again with just the remainder of occurrence. If <b>pcre2_match()</b> is called again with just the remainder of
the subject, namely "issipi", it does not match, because \B is always false at the subject, namely "issippi", it does not match, because \B is always false
the start of the subject, which is deemed to be a word boundary. However, if at the start of the subject, which is deemed to be a word boundary. However, if
<b>pcre2_match()</b> is passed the entire string again, but with <b>pcre2_match()</b> is passed the entire string again, but with
<i>startoffset</i> set to 4, it finds the second occurrence of "iss" because it <i>startoffset</i> set to 4, it finds the second occurrence of "iss" because it
is able to look behind the starting point to discover that it is preceded by a is able to look behind the starting point to discover that it is preceded by a

View File

@ -215,8 +215,8 @@ if (rc &lt; 0)
return 1; return 1;
} }
/* Match succeded. Get a pointer to the output vector, where string offsets are /* Match succeeded. Get a pointer to the output vector, where string offsets
stored. */ are stored. */
ovector = pcre2_get_ovector_pointer(match_data); ovector = pcre2_get_ovector_pointer(match_data);
printf("Match succeeded at offset %d\n", (int)ovector[0]); printf("Match succeeded at offset %d\n", (int)ovector[0]);
@ -453,7 +453,7 @@ for (;;)
return 1; return 1;
} }
/* Match succeded */ /* Match succeeded */
printf("\nMatch succeeded again at offset %d\n", (int)ovector[0]); printf("\nMatch succeeded again at offset %d\n", (int)ovector[0]);

View File

@ -54,6 +54,7 @@ platforms:
<pre> <pre>
ARM 32-bit (v5, v7, and Thumb2) ARM 32-bit (v5, v7, and Thumb2)
ARM 64-bit ARM 64-bit
IBM s390x 64 bit
Intel x86 32-bit and 64-bit Intel x86 32-bit and 64-bit
MIPS 32-bit and 64-bit MIPS 32-bit and 64-bit
Power PC 32-bit and 64-bit Power PC 32-bit and 64-bit
@ -286,7 +287,7 @@ inefficient solution, and not recommended.
This is a suggestion for how a multithreaded program that needs to set up This is a suggestion for how a multithreaded program that needs to set up
non-default JIT stacks might operate: non-default JIT stacks might operate:
<pre> <pre>
During thread initalization During thread initialization
thread_local_var = pcre2_jit_stack_create(...) thread_local_var = pcre2_jit_stack_create(...)
During thread exit During thread exit

View File

@ -745,7 +745,7 @@ Unicode support is not needed for these characters to be recognized.
<P> <P>
It is possible to restrict \R to match only CR, LF, or CRLF (instead of the It is possible to restrict \R to match only CR, LF, or CRLF (instead of the
complete set of Unicode line endings) by setting the option PCRE2_BSR_ANYCRLF complete set of Unicode line endings) by setting the option PCRE2_BSR_ANYCRLF
at compile time. (BSR is an abbrevation for "backslash R".) This can be made at compile time. (BSR is an abbreviation for "backslash R".) This can be made
the default when PCRE2 is built; if this is the case, the other behaviour can the default when PCRE2 is built; if this is the case, the other behaviour can
be requested via the PCRE2_BSR_UNICODE option. It is also possible to specify be requested via the PCRE2_BSR_UNICODE option. It is also possible to specify
these settings by starting a pattern string with one of the following these settings by starting a pattern string with one of the following
@ -1090,7 +1090,7 @@ additional characters according to the following rules for ending a cluster:
3. Do not break Hangul (a Korean script) syllable sequences. Hangul characters 3. Do not break Hangul (a Korean script) syllable sequences. Hangul characters
are of five types: L, V, T, LV, and LVT. An L character may be followed by an are of five types: L, V, T, LV, and LVT. An L character may be followed by an
L, V, LV, or LVT character; an LV or V character may be followed by a V or T L, V, LV, or LVT character; an LV or V character may be followed by a V or T
character; an LVT or T character may be follwed only by a T character. character; an LVT or T character may be followed only by a T character.
</P> </P>
<P> <P>
4. Do not end before extending characters or spacing marks or the "zero-width 4. Do not end before extending characters or spacing marks or the "zero-width
@ -3607,7 +3607,7 @@ successful match if there is a later mismatch. Consider:
</pre> </pre>
If the subject is "aaaac...", after the first match attempt fails (starting at If the subject is "aaaac...", after the first match attempt fails (starting at
the first character in the string), the starting point skips on to start the the first character in the string), the starting point skips on to start the
next attempt at "c". Note that a possessive quantifer does not have the same next attempt at "c". Note that a possessive quantifier does not have the same
effect as this example; although it would suppress backtracking during the effect as this example; although it would suppress backtracking during the
first match attempt, the second attempt would start at the second character first match attempt, the second attempt would start at the second character
instead of skipping on to "c". instead of skipping on to "c".

View File

@ -2583,14 +2583,14 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION
which finds occurrences of "iss" in the middle of words. (\B matches which finds occurrences of "iss" in the middle of words. (\B matches
only if the current position in the subject is not a word boundary.) only if the current position in the subject is not a word boundary.)
When applied to the string "Mississipi" the first call to pcre2_match() When applied to the string "Mississippi" the first call to
finds the first occurrence. If pcre2_match() is called again with just pcre2_match() finds the first occurrence. If pcre2_match() is called
the remainder of the subject, namely "issipi", it does not match, be- again with just the remainder of the subject, namely "issippi", it does
cause \B is always false at the start of the subject, which is deemed not match, because \B is always false at the start of the subject,
to be a word boundary. However, if pcre2_match() is passed the entire which is deemed to be a word boundary. However, if pcre2_match() is
string again, but with startoffset set to 4, it finds the second occur- passed the entire string again, but with startoffset set to 4, it finds
rence of "iss" because it is able to look behind the starting point to the second occurrence of "iss" because it is able to look behind the
discover that it is preceded by a letter. starting point to discover that it is preceded by a letter.
Finding all the matches in a subject is tricky when the pattern can Finding all the matches in a subject is tricky when the pattern can
match an empty string. It is possible to emulate Perl's /g behaviour by match an empty string. It is possible to emulate Perl's /g behaviour by
@ -5107,6 +5107,7 @@ AVAILABILITY OF JIT SUPPORT
ARM 32-bit (v5, v7, and Thumb2) ARM 32-bit (v5, v7, and Thumb2)
ARM 64-bit ARM 64-bit
IBM s390x 64 bit
Intel x86 32-bit and 64-bit Intel x86 32-bit and 64-bit
MIPS 32-bit and 64-bit MIPS 32-bit and 64-bit
Power PC 32-bit and 64-bit Power PC 32-bit and 64-bit
@ -5326,7 +5327,7 @@ CONTROLLING THE JIT STACK
This is a suggestion for how a multithreaded program that needs to set This is a suggestion for how a multithreaded program that needs to set
up non-default JIT stacks might operate: up non-default JIT stacks might operate:
During thread initalization During thread initialization
thread_local_var = pcre2_jit_stack_create(...) thread_local_var = pcre2_jit_stack_create(...)
During thread exit During thread exit
@ -6816,7 +6817,7 @@ BACKSLASH
It is possible to restrict \R to match only CR, LF, or CRLF (instead of It is possible to restrict \R to match only CR, LF, or CRLF (instead of
the complete set of Unicode line endings) by setting the option the complete set of Unicode line endings) by setting the option
PCRE2_BSR_ANYCRLF at compile time. (BSR is an abbrevation for "back- PCRE2_BSR_ANYCRLF at compile time. (BSR is an abbreviation for "back-
slash R".) This can be made the default when PCRE2 is built; if this is slash R".) This can be made the default when PCRE2 is built; if this is
the case, the other behaviour can be requested via the PCRE2_BSR_UNI- the case, the other behaviour can be requested via the PCRE2_BSR_UNI-
CODE option. It is also possible to specify these settings by starting CODE option. It is also possible to specify these settings by starting
@ -7016,8 +7017,8 @@ BACKSLASH
3. Do not break Hangul (a Korean script) syllable sequences. Hangul 3. Do not break Hangul (a Korean script) syllable sequences. Hangul
characters are of five types: L, V, T, LV, and LVT. An L character may characters are of five types: L, V, T, LV, and LVT. An L character may
be followed by an L, V, LV, or LVT character; an LV or V character may be followed by an L, V, LV, or LVT character; an LV or V character may
be followed by a V or T character; an LVT or T character may be follwed be followed by a V or T character; an LVT or T character may be fol-
only by a T character. lowed only by a T character.
4. Do not end before extending characters or spacing marks or the 4. Do not end before extending characters or spacing marks or the
"zero-width joiner" character. Characters with the "mark" property al- "zero-width joiner" character. Characters with the "mark" property al-
@ -9388,7 +9389,7 @@ BACKTRACKING CONTROL
If the subject is "aaaac...", after the first match attempt fails If the subject is "aaaac...", after the first match attempt fails
(starting at the first character in the string), the starting point (starting at the first character in the string), the starting point
skips on to start the next attempt at "c". Note that a possessive quan- skips on to start the next attempt at "c". Note that a possessive quan-
tifer does not have the same effect as this example; although it would tifier does not have the same effect as this example; although it would
suppress backtracking during the first match attempt, the second at- suppress backtracking during the first match attempt, the second at-
tempt would start at the second character instead of skipping on to tempt would start at the second character instead of skipping on to
"c". "c".

View File

@ -2628,10 +2628,10 @@ lookbehind. For example, consider the pattern
.sp .sp
which finds occurrences of "iss" in the middle of words. (\eB matches only if which finds occurrences of "iss" in the middle of words. (\eB matches only if
the current position in the subject is not a word boundary.) When applied to the current position in the subject is not a word boundary.) When applied to
the string "Mississipi" the first call to \fBpcre2_match()\fP finds the first the string "Mississippi" the first call to \fBpcre2_match()\fP finds the first
occurrence. If \fBpcre2_match()\fP is called again with just the remainder of occurrence. If \fBpcre2_match()\fP is called again with just the remainder of
the subject, namely "issipi", it does not match, because \eB is always false at the subject, namely "issippi", it does not match, because \eB is always false
the start of the subject, which is deemed to be a word boundary. However, if at the start of the subject, which is deemed to be a word boundary. However, if
\fBpcre2_match()\fP is passed the entire string again, but with \fBpcre2_match()\fP is passed the entire string again, but with
\fIstartoffset\fP set to 4, it finds the second occurrence of "iss" because it \fIstartoffset\fP set to 4, it finds the second occurrence of "iss" because it
is able to look behind the starting point to discover that it is preceded by a is able to look behind the starting point to discover that it is preceded by a

View File

@ -215,8 +215,8 @@ if (rc < 0)
return 1; return 1;
} }
/* Match succeded. Get a pointer to the output vector, where string offsets are /* Match succeeded. Get a pointer to the output vector, where string offsets
stored. */ are stored. */
ovector = pcre2_get_ovector_pointer(match_data); ovector = pcre2_get_ovector_pointer(match_data);
printf("Match succeeded at offset %d\en", (int)ovector[0]); printf("Match succeeded at offset %d\en", (int)ovector[0]);
@ -453,7 +453,7 @@ for (;;)
return 1; return 1;
} }
/* Match succeded */ /* Match succeeded */
printf("\enMatch succeeded again at offset %d\en", (int)ovector[0]); printf("\enMatch succeeded again at offset %d\en", (int)ovector[0]);

View File

@ -267,7 +267,7 @@ inefficient solution, and not recommended.
This is a suggestion for how a multithreaded program that needs to set up This is a suggestion for how a multithreaded program that needs to set up
non-default JIT stacks might operate: non-default JIT stacks might operate:
.sp .sp
During thread initalization During thread initialization
thread_local_var = pcre2_jit_stack_create(...) thread_local_var = pcre2_jit_stack_create(...)
.sp .sp
During thread exit During thread exit

View File

@ -741,7 +741,7 @@ Unicode support is not needed for these characters to be recognized.
.P .P
It is possible to restrict \eR to match only CR, LF, or CRLF (instead of the It is possible to restrict \eR to match only CR, LF, or CRLF (instead of the
complete set of Unicode line endings) by setting the option PCRE2_BSR_ANYCRLF complete set of Unicode line endings) by setting the option PCRE2_BSR_ANYCRLF
at compile time. (BSR is an abbrevation for "backslash R".) This can be made at compile time. (BSR is an abbreviation for "backslash R".) This can be made
the default when PCRE2 is built; if this is the case, the other behaviour can the default when PCRE2 is built; if this is the case, the other behaviour can
be requested via the PCRE2_BSR_UNICODE option. It is also possible to specify be requested via the PCRE2_BSR_UNICODE option. It is also possible to specify
these settings by starting a pattern string with one of the following these settings by starting a pattern string with one of the following
@ -1082,7 +1082,7 @@ additional characters according to the following rules for ending a cluster:
3. Do not break Hangul (a Korean script) syllable sequences. Hangul characters 3. Do not break Hangul (a Korean script) syllable sequences. Hangul characters
are of five types: L, V, T, LV, and LVT. An L character may be followed by an are of five types: L, V, T, LV, and LVT. An L character may be followed by an
L, V, LV, or LVT character; an LV or V character may be followed by a V or T L, V, LV, or LVT character; an LV or V character may be followed by a V or T
character; an LVT or T character may be follwed only by a T character. character; an LVT or T character may be followed only by a T character.
.P .P
4. Do not end before extending characters or spacing marks or the "zero-width 4. Do not end before extending characters or spacing marks or the "zero-width
joiner" character. Characters with the "mark" property always have the joiner" character. Characters with the "mark" property always have the
@ -3658,7 +3658,7 @@ successful match if there is a later mismatch. Consider:
.sp .sp
If the subject is "aaaac...", after the first match attempt fails (starting at If the subject is "aaaac...", after the first match attempt fails (starting at
the first character in the string), the starting point skips on to start the the first character in the string), the starting point skips on to start the
next attempt at "c". Note that a possessive quantifer does not have the same next attempt at "c". Note that a possessive quantifier does not have the same
effect as this example; although it would suppress backtracking during the effect as this example; although it would suppress backtracking during the
first match attempt, the second attempt would start at the second character first match attempt, the second attempt would start at the second character
instead of skipping on to "c". instead of skipping on to "c".

View File

@ -198,8 +198,8 @@ if (rc < 0)
return 1; return 1;
} }
/* Match succeded. Get a pointer to the output vector, where string offsets are /* Match succeeded. Get a pointer to the output vector, where string offsets
stored. */ are stored. */
ovector = pcre2_get_ovector_pointer(match_data); ovector = pcre2_get_ovector_pointer(match_data);
printf("Match succeeded at offset %d\n", (int)ovector[0]); printf("Match succeeded at offset %d\n", (int)ovector[0]);
@ -436,7 +436,7 @@ for (;;)
return 1; return 1;
} }
/* Match succeded */ /* Match succeeded */
printf("\nMatch succeeded again at offset %d\n", (int)ovector[0]); printf("\nMatch succeeded again at offset %d\n", (int)ovector[0]);