Lines Matching refs:matches

70        alternative function that matches the same compiled patterns in a  dif-
130 and subsequent matches to save redundant checks.
1058 By default, the sequence \R in a pattern matches any Unicode newline
1064 the default is changed so that \R matches only CR, LF, or CRLF. What-
1416 single path through the tree, checking that the subject matches what is
1444 matches. In Friedl's terminology, this is a kind of "DFA algorithm",
1459 est. The matches are returned in decreasing order of length. There is
1463 Note that all the matches that are found start at the same point in the
1471 cally move on to find matches that start at later positions.
1478 match is found. If you really do want multiple matches in such cases,
1485 1. Because the algorithm finds all possible matches, the greedy or
1493 This pattern matches "aaab!" but not "aaa!", which would be matched by
1521 matches a single data unit, even in UTF-8, UTF-16 or UTF-32 modes, is
1536 1. All possible matches (at a single point in the subject) are automat-
1556 partly because it has to search for all possible matches, but is also
1765 ing. The alternative algorithm finds all possible matches (at a given
1866 the \n or \r escape sequences, nor does it affect what \R matches,
1970 the \R escape sequence matches by default. A value of 0 means that \R
1971 matches any Unicode line ending sequence; a value of 1 means that \R
1972 matches only CR, LF, or CRLF. The default can be overridden when a pat-
2134 sequence matches. The choice is either to match only CR, LF, or CRLF,
2154 If this bit is set, a dollar metacharacter in the pattern matches only
2156 matches immediately before a newline at the end of the string (but not
2163 If this bit is set, a dot metacharacter in the pattern matches a char-
2165 only ever matches one character, even if newlines are coded as CRLF.
2169 such as [^a] always matches newline characters, independent of the set-
2243 (2) At run time, a back reference to an unset subpattern group matches
2249 (3) \U matches an upper case "U" character; by default \U causes a com-
2252 (4) \u matches a lower case "u" character unless it is followed by four
2257 (5) \x matches a lower case "x" character unless it is followed by two
2261 for example, \xz matches a binary zero character followed by z).
2268 metacharacter (^) matches only at the start of the string, and the "end
2269 of line" metacharacter ($) matches only at the end of the string, or
2552 for patterns to be analyzed, and for one-off matches and simple pat-
2771 -1 is returned, indicating that the pattern matches only at the start
2804 2 is returned, indicating that the pattern matches only at the start of
2818 Return 1 if the pattern contains any explicit matches for CR or LF
3259 sequence matches. The choice is either to match only CR, LF, or CRLF,
3279 explicit matches for CR or LF characters, the match position is
3293 matches such as [^X] do not count, nor does \s (which includes CR and
3294 LF in the characters that it matches).
3326 is applied to a string not beginning with "a" or "b", it matches an
3387 (*COMMIT) prevents any further matches being tried, so the overall
3423 making repeated calls to find all the matches in a single subject
3480 which finds occurrences of "iss" in the middle of words. (\B matches
3491 Finding all the matches in a subject is tricky when the pattern can
3509 In general, a pattern matches a certain portion of the subject, and in
3931 can happen when capturing subpattern number n+1 matches some part of
4043 the subject. If you want to find all possible matches, or the longest
4046 need to find all possible matches, you can kludge it up by making use
4054 matches, pcre_exec() will yield PCRE_ERROR_NOMATCH.
4109 lot of potential matches.
4147 matches have also been found. When PCRE_PARTIAL_SOFT is set, the return
4149 of the subject is reached, there have been no complete matches, but
4176 string in the subject. Note, however, that all the matches from one run
4178 matches are all initial substrings of the longer matches. For example,
4203 est matching string is given first. If there were too many matches to
4205 filled with the longest matches. Unlike pcre_exec(), pcre_dfa_exec()
4213 ble match is found. If you really do want multiple matches in such
4351 piles and matches patterns, callouts sometimes do not happen exactly as
4594 Pattern PCRE matches Perl matches
4664 \p{Lu} always matches an upper case letter. I think Perl has changed in
4680 meta-character matches only at the very end of the string.
4850 changes the convention to CR. That pattern matches "a\nb" because LF is
4857 does not affect what the \R escape sequence matches. By default, this
4867 sive calls. These facilities are provided to catch runaway matches that
4903 matches a portion of a subject string that is identical to itself. When
4982 Pattern PCRE matches Perl matches
5110 its. Otherwise, it matches a literal "x" character. In JavaScript
5112 must be followed by four hexadecimal digits; otherwise it matches a
5152 PCRE_JAVASCRIPT_COMPAT option is set, \U matches a "U" character, and
5187 There is also the single sequence \N, which matches a non-newline char-
5194 matches one, and only one, of each pair. The sequences can appear both
5228 \d any character that matches \p{Nd} (decimal digit)
5229 \s any character that matches \p{Z} or \h or \v
5230 \w any character that matches \p{L} or \p{N}, plus underscore
5233 \d matches only decimal digits, whereas \w matches any Unicode digit,
5279 Outside a character class, by default, the escape sequence \R matches
5286 below. This particular group matches either the two-character sequence
5321 an unrecognized escape sequence, and so matches the letter "R" by
5337 script names, the general category properties, "Any", which matches any
5434 The special property L& is also supported: it matches a character that
5454 For example, \p{Lu} always matches only upper case letters. This is
5466 The \X escape matches any number of Unicode characters that form an
5482 PCRE later than 8.31, \X matches one of these clusters.
5484 \X always matches at least one character. Then it decides whether to
5520 Xan matches characters that have either the L (letter) or the N (num-
5521 ber) property. Xps matches the characters tab, linefeed, vertical tab,
5525 lowed at release 8.34. Xwd matches the same characters as Xan, plus
5528 There is another non-standard property, Xuc, which matches any charac-
5545 matches "foobar", but reports that it has matched "bar". This feature
5554 matches "foobar", the first substring is still set to "foo".
5559 pattern such as (?=ab\K) matches, the reported start of the match can
5570 \b matches at a word boundary
5571 \B matches when not at a word boundary
5572 \A matches at the start of the subject
5573 \Z matches at the end of the subject
5574 also matches before a newline at the end of the subject
5575 \z matches only at the end of the subject
5576 \G matches at the first matching position in the subject
5578 Inside a character class, \b has a different meaning; it matches the
5580 character class, by default it matches the corresponding literal char-
5581 acter (for example, \B matches the letter B). However, if the
5587 one matches \w and the other matches \W), or the start or end of the
5588 string if the first or last character matches \w, respectively. In a
5593 For example, the fragment \ba matches "a" at the start of a word.
5604 that \Z matches before a newline at the end of the string as well as at
5605 the very end, whereas \z matches only at the end.
5654 The meaning of dollar can be changed so that it matches only at the
5660 matches immediately after internal newlines as well as at the start of
5662 string. A dollar matches before any newlines in the string, as well as
5667 For example, the pattern /^abc$/ matches the subject string "def\nabc"
5683 Outside a character class, a dot in the pattern matches any one charac-
5687 When a line ending is defined as a single character, dot never matches
5690 matches all characters (including isolated CRs and LFs). When any Uni-
5695 PCRE_DOTALL option is set, a dot matches any one character, without
5704 affected by the PCRE_DOTALL option. In other words, it matches any
5711 Outside a character class, the escape sequence \C matches any one data
5714 32-bit library it is a 32-bit unit. Unlike a dot, \C always matches
5758 A character class matches a single character in the subject. In a UTF
5766 For example, the character class [aeiou] matches any lower case vowel,
5767 while [^aeiou] matches any character that is not a lower case vowel.
5780 [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not
5793 PCRE_MULTILINE options is used. A class such as [^a] always matches one
5797 ters in a character class. For example, [d-m] matches any letter
5802 example, [b-d-z] matches letters in the range b to d, a hyphen charac-
5825 it matches the letters in either case. For example, [W-c] is equivalent
5827 character tables for a French locale are in use, [\xc8-\xcb] matches
5834 they match to the class. For example, [\dABCDEF] matches any hexadeci-
5839 meaning inside a character class; it matches the backspace character.
5847 lower case type. For example, the class [^\W_] matches any letter or
5869 matches "0", "1", any alphabetic character, or "%". The supported class
5901 matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the
5923 [:graph:] This matches characters that have glyphs that mark the page
5924 when printed. In Unicode property terms, it matches all char-
5932 [:print:] This matches the same characters as [:graph:] plus space
5936 [:punct:] This matches all characters that have the Unicode P (punctua-
5957 that \b matches at the start and the end of a word (see "Simple asser-
5971 matches either "gilbert" or "sullivan". Any number of alternatives may
6014 matches abc and aBc and no other strings (assuming PCRE_CASELESS is not
6022 matches "ab", "aB", "c", and "C", even though when matching "C" the
6050 matches "cataract", "caterpillar", or "cat". Without the parentheses,
6054 that, when the whole pattern matches, that portion of the subject
6106 turing parentheses are numbered one. Thus, when the pattern matches,
6122 matches "abcabc" or "defdef":
6128 pattern matches "abcabc" or "defabc":
6194 tern matches both "foofoo" and "barbar" but not "foobar" or "barfoo":
6230 an escape such as \d or \pL that matches a single character
6237 ber of permitted matches, by giving the two numbers in curly brackets
6243 matches "zz", "zzz", or "zzzz". A closing brace on its own is not a
6247 matches. Thus
6251 matches at least 3 successive vowels, but may match many more, while
6255 matches exactly 8 digits. An opening curly bracket that appears in a
6261 data units. Thus, for example, \x{100}{2} matches two characters, each
6263 larly, \X{3} matches three Unicode extended grapheme clusters, each of
6307 fails, because it matches the entire string owing to the greediness of
6311 be greedy, and instead matches the minimum number of times possible, so
6318 matches. Do not confuse this use of question mark with its use as a
6324 which matches one digit by preference, but can match two if that is the
6325 only way the rest of the pattern matches.
6365 It matches "ab" in the subject "aab". The use of the backtracking con-
6380 matches "aba" the value of the second captured substring is "b".
6416 An alternative description is that a subpattern of this type matches
6461 atomic group is the only way to avoid some failing matches taking a
6466 matches an unlimited number of substrings that either consist of non-
6468 matches, it runs quickly. However, if it is applied to
6534 A back reference matches whatever actually matched the capturing sub-
6541 matches "sense and sensibility" and "response and responsibility", but
6548 matches "rah rah" and "RAH RAH", but not "RAH rah", even though the
6574 ence to an unset value matches an empty string.
6587 matches. However, such references can be useful inside repeated sub-
6592 matches any number of "a"s and also "aba", "ababbaa" etc. At each iter-
6593 ation of the subpattern, the back reference matches the character
6650 matches a word followed by a semicolon, but does not include the semi-
6655 matches any occurrence of "foo" that is not followed by "bar". Note
6667 always matches, so an assertion that requires there not to be an empty
6680 strings it matches must have a fixed length. However, if there are sev-
6711 In a UTF mode, PCRE does not allow the \C escape (which matches a sin-
6718 lookbehinds, as long as the subpattern matches a fixed-length string.
6729 and then see if what follows matches the rest of the pattern. If the
6734 the initial .* matches the entire string at first, but when this fails
6754 matches "foo" preceded by three digits that are not "999". Notice that
6773 matches an occurrence of "baz" that is preceded by "bar" which in turn
6778 is another pattern that matches "foo" preceded by three digits and any
6828 The first part matches an optional opening parenthesis, and if that
6830 ond part matches one or more characters that are not parentheses. The
6835 wise, since no-pattern is not present, the subpattern matches nothing.
6836 In other words, this pattern matches a sequence of non-parentheses,
6895 group named "byte" is defined. This matches an individual component of
6912 The condition is a positive lookahead assertion that matches an
6916 otherwise it is matched against the second. This pattern matches
6954 that can be done is to use a pattern that matches up to some fixed
6987 First it matches an opening parenthesis. Then it matches any number of
7056 recursion. Consider this pattern, which matches text in angle brack-
7080 The idea is that it either matches a single character, or two identical
7088 tern 1 successfully matches the next character ("b"). (Note that the
7108 To change the pattern so that it matches all palindromic strings, not
7127 If run with the PCRE_CASELESS option, this pattern matches phrases such
7151 In PCRE, this pattern matches "bab". The first capturing parentheses
7153 to match "b", the second alternative matches "a" and then recurses. In
7175 matches "sense and sensibility" and "response and responsibility", but
7197 It matches "abcabc". It does not match "abcABC" because the change of
7337 This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is cap-
7403 If you are interested in (*MARK) values after failed matches, you
7437 This matches "xxaab" but not "aacaab". It can be thought of as a kind
7525 If the COND1 pattern matches, FOO is tried (and possibly further items
7567 ungreedy, it initially matches zero characters. The condition (?=a)
7591 If A matches but B fails, the backtrack to (*COMMIT) causes the entire
7611 If the subject is "abac", Perl matches, but PCRE fails because the
8137 supported. For example, \p{L} matches a letter. Its Perl synonym,
8244 4. The dot metacharacter matches one UTF character instead of a single
8319 matches.
8398 complete matches. If you want to run partial matches using the
8725 ing function matches as far as it goes, but is too short to match the
8762 partial matches on the same pattern. If the appropriate JIT study mode
8804 This pattern matches "123", but only if it is preceded by "abc". If the
8836 (In this example, there are two partial matches, because "dog" on its
8837 own partially matches the second alternative.)
8843 without continuing to search for possible complete matches. This option
8865 This matches either "dog" or "dogsbody", greedily (that is, it prefers
8889 without backtracking, searching for all possible matches simultane-
8895 there have been no complete matches. Otherwise, the complete matches
8897 takes precedence over any complete matches. The portion of the string
8902 Because the DFA functions always search for all possible matches, and
8923 This matches "cat", provided there is a word boundary at either end. If
8926 However, normal matching carries on, and \b matches at the end of the
8971 plete pattern, but the first two are partial matches. Similar output is
9029 \z, \Z, \b, \B, and $. Consider an unanchored pattern that matches
9113 no completed matches. This means that as soon as the shortest match has
9136 finds both matches.
9162 because the start of the second alternative matches within the first
9450 matches the subject "first\nand second" (where \n stands for a newline
9659 . matches newline no PCRE_DOTALL
9660 newline matches [^a] yes not changeable
9661 $ matches \n at end yes PCRE_DOLLARENDONLY
9662 $ matches \n in middle no PCRE_MULTILINE
9663 ^ matches \n in middle no PCRE_MULTILINE
9669 . matches newline yes REG_NEWLINE
9670 newline matches [^a] yes REG_NEWLINE
9671 $ matches \n at end no REG_NEWLINE
9672 $ matches \n in middle no REG_NEWLINE
9673 ^ matches \n in middle no REG_NEWLINE
9797 The "FullMatch" operation checks that supplied text matches a supplied
9852 a. "text" matches "pattern" exactly;
9947 PCRE_DOTALL dot matches newlines /s
9948 PCRE_DOLLAR_ENDONLY $ matches only at end N/A
9981 matches PCRE does; match_limit_recursion() limits the depth of internal
10085 pattern matches and a replacement occurs, false otherwise.
10097 Extract is like Replace, except that if the pattern matches, "rewrite"
10132 compiles the regular expression that is its first argument, and matches
10139 to check for further matches of the same regular expression in the same
10328 It matches from wherever it starts until it encounters "<inet" or the
10330 processing an XML file. Each iteration of the outer parentheses matches
10335 rewritten pattern, which matches exactly the same strings: