Lines Matching refs:subject

225             PCRE_SPTR16 subject, int length, int startoffset,
229 PCRE_SPTR16 subject, int length, int startoffset,
237 PCRE_SPTR16 subject, int *ovector,
241 int pcre16_copy_substring(PCRE_SPTR16 subject, int *ovector,
246 PCRE_SPTR16 subject, int *ovector,
256 int pcre16_get_substring(PCRE_SPTR16 subject, int *ovector,
260 int pcre16_get_substring_list(PCRE_SPTR16 subject,
409 The lengths and starting offsets of subject strings must be specified
410 in 16-bit data units, and the offsets within subject strings that are
488 The subject and mark fields in the callout block that is passed to a
496 with the command line option -16, patterns and subject strings are con-
556 PCRE_SPTR32 subject, int length, int startoffset,
560 PCRE_SPTR32 subject, int length, int startoffset,
568 PCRE_SPTR32 subject, int *ovector,
572 int pcre32_copy_substring(PCRE_SPTR32 subject, int *ovector,
577 PCRE_SPTR32 subject, int *ovector,
587 int pcre32_get_substring(PCRE_SPTR32 subject, int *ovector,
591 int pcre32_get_substring_list(PCRE_SPTR32 subject,
740 The lengths and starting offsets of subject strings must be specified
741 in 32-bit data units, and the offsets within subject strings that are
816 The subject and mark fields in the callout block that is passed to a
824 with the command line option -32, patterns and subject strings are con-
1385 When there is only one possible way in which a given subject string can
1405 pattern to a given subject string (from a given starting point) can be
1416 single path through the tree, checking that the subject matches what is
1421 left) in the subject string as well. The order in which repetition
1441 from the first matching point in the subject, it scans the subject
1449 scans the subject string only once, without backtracking, there is one
1454 The scan continues until either the end of the subject is reached, or
1464 subject. If the pattern
1470 at the fifth character of the subject. The algorithm does not automati-
1523 through the subject string one character (not data unit) at a time, for
1536 1. All possible matches (at a single point in the subject) are automat-
1541 2. Because the alternative algorithm scans the subject string just
1543 sible to pass very long subject strings to the matching function in
1606 const char *subject, int length, int startoffset,
1610 const char *subject, int length, int startoffset,
1618 const char *subject, int *ovector,
1622 int pcre_copy_substring(const char *subject, int *ovector,
1627 const char *subject, int *ovector,
1637 int pcre_get_substring(const char *subject, int *ovector,
1641 int pcre_get_substring_list(const char *subject,
1652 const char *subject, int length, int startoffset,
1766 point in the subject), and scans the subject just once (unless there
1773 convenience functions for extracting captured substrings from a subject
2119 that is being searched (the "subject string"). This effect can also be
2154 at the end of the subject string. Without this option, a dollar also
2228 before or at the first newline in the subject string, though the
2245 set (assuming it can find an "a" in the subject), whereas it fails by
2265 line", PCRE treats the subject string as consisting of a single line of
2276 newlines in the subject string, respectively, as well as at the very
2279 lines in a subject string, or no occurrences of ^ or $ in a pattern,
2384 This option causes PCRE to regard both the pattern and the subject as
2401 checking of subject strings only. If the same string is being matched
2584 re, sd, "subject", 7, 0, 0, ovector, 30);
2590 of subject string that is needed to match the pattern is computed. This
2599 bytes is created. This speeds up finding a position in the subject at
2771 of a subject string or after any newline within the string. Otherwise
2804 a subject string or after any newline within the string. Otherwise 0 is
2886 If the pattern was studied and a minimum length for matching subject
3063 const char *subject, int length, int startoffset,
3066 The function pcre_exec() is called to match a subject string against a
3070 ments as many times as you like, in order to match different subject
3091 "some string", /* the subject string */
3092 11, /* the length of the subject string */
3093 0, /* start at offset 0 in the subject */
3149 zero for each position in the subject string.
3301 This option specifies that first character of the subject string is not
3309 This option specifies that the end of the subject string is not the end
3326 empty string at the start of the subject. With PCRE_NOTEMPTY set, this
3333 not at the start of the subject is permitted. If the pattern is
3354 searches the subject for that character, and fails immediately if it
3361 pre-scan of the subject that takes place before the pattern is run.
3367 position in the subject string. If PCRE_NO_START_OPTIMIZE is set at
3379 with the character "A". Suppose the subject string is "DEFABC". The
3380 start-up optimization scans along the subject, finds "A" and runs the
3384 set, the initial scan along the subject string does not happen. The
3388 mizations may be used. For example, a minimum length for the subject
3393 The minimum length for a match is one character. If the subject is
3396 does not take place, because PCRE knows that the subject is too short,
3403 When PCRE_UTF8 is set at compile time, the validity of the subject as a
3411 truncated character at the end of the subject, PCRE_ERROR_SHORTUTF8. In
3416 to the end of the subject), PCRE_ERROR_BADUTF8_OFFSET is returned.
3418 If you already know that your subject is valid, and you want to skip
3422 making repeated calls to find all the matches in a single subject
3424 points to the start of a character (or the end of the subject). When
3426 subject or an invalid value of startoffset is undefined. Your program
3434 match occurs if the end of the subject string is reached successfully,
3435 but there are not enough subject characters to complete the match. If
3456 The subject string is passed to pcre_exec() as a pointer in subject, a
3462 If startoffset is negative or greater than the length of the subject,
3464 zero, the search for a match starts at the beginning of the subject,
3468 sets are valid). Unlike the pattern string, the subject may contain
3472 in the same subject by calling pcre_exec() again after a previous suc-
3480 only if the current position in the subject is not a word boundary.)
3483 the remainder of the subject, namely "issipi", it does not match,
3484 because \B is always false at the start of the subject, which is deemed
3490 Finding all the matches in a subject is tricky when the pattern can
3504 subject.
3508 In general, a pattern matches a certain portion of the subject, and in
3509 addition, further substrings from the subject may be picked out by
3539 portion of the subject string matched by the entire pattern. The next
3567 given with subject string "abd", pcre_exec() will try to set the second
3581 of the subject when subpattern n has not been used at all. For example,
3611 The subject string did not match the pattern.
3615 Either code or subject was passed as NULL, or ovector was NULL and
3669 subject, and the PCRE_NO_UTF8_CHECK option was not set. If the size of
3675 acter at the end of the subject (reason codes 1 to 5),
3680 The UTF-8 byte sequence that was passed as a subject was checked and
3683 ter or the end of the subject.
3687 The subject string did not match, but it did match partially. See the
3719 subject, that is, the value in length.
3723 This error is returned instead of PCRE_ERROR_BADUTF8 when the subject
3736 position in the subject string. Some simple patterns that might do this
3861 int pcre_copy_substring(const char *subject, int *ovector,
3865 int pcre_get_substring(const char *subject, int *ovector,
3869 int pcre_get_substring_list(const char *subject,
3889 tions: subject is the subject string that has just been successfully
3931 the subject, but subpattern n has not been used at all, they return an
3953 const char *subject, int *ovector,
3958 const char *subject, int *ovector,
4042 the subject. If you want to find all possible matches, or the longest
4084 const char *subject, int length, int startoffset,
4088 The function pcre_dfa_exec() is called to match a subject string
4090 subject string just once, and does not backtrack. This has different
4118 "some string", /* the subject string */
4119 11, /* the length of the subject string */
4120 0, /* start at offset 0 in the subject */
4148 of the subject is reached, there have been no complete matches, but
4160 at the first possible matching point in the subject string.
4165 again, with additional subject characters, and have it continue with
4175 string in the subject. Note, however, that all the matches from one run
4176 of the function start at the same point in the subject. The shorter
4390 subject string is "abyz", the lack of "d" means that matching doesn't
4396 running a match if the subject is not long enough, or, for unanchored
4417 const char *subject; (8-bit version)
4418 PCRE_SPTR16 subject; (16-bit version)
4419 PCRE_SPTR32 subject; (32-bit version)
4448 The subject and subject_length fields contain copies of the values that
4451 The start_match field normally contains the offset within the subject
4456 for different starting points in the subject.
4458 The current_position field contains the offset within the subject of
4563 4. Though binary zero characters are supported in the subject string,
4690 tried only at the first matching position in the subject string.
4895 A regular expression is a pattern that is matched against a subject
4897 pattern, and match the corresponding characters in the subject. As a
4902 matches a portion of a subject string that is identical to itself. When
5197 the subject string, all of them fail, because there is no character to
5488 1. End at the end of the subject string.
5547 this case, the part of the subject before the real match does not have
5566 a match, without consuming any characters from the subject string. The
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
5585 A word boundary is a position in the subject string where the current
5597 at the very start and end of the subject string, whatever options are
5603 the subject, \A can never match. The difference between \Z and \z is
5629 suming any characters from the subject string.
5633 point is at the start of the subject string. If the startoffset argu-
5647 matching point is at the end of the subject string, or immediately
5661 the subject string. It does not match after a newline that ends the
5667 For example, the pattern /^abc$/ matches the subject string "def\nabc"
5676 and end of the subject in both modes, and if all branches of a pattern
5684 ter in the subject string except (by default) a character that signi-
5696 exception. If the two-character sequence CRLF is present in the subject
5758 A character class matches a single character in the subject. In a UTF
5762 case the subject character must not be in the set defined by the class.
5771 sumes a character from the subject string, and therefore it fails if
6050 that, when the whole pattern matches, that portion of the subject
6336 tried against every character position in the subject string, so there
6341 In cases where it is known that the subject string contains no new-
6346 When .* is inside capturing parentheses that are the subject of a back
6352 If the subject is "xyz123abc123" the match point is the fourth charac-
6361 It matches "ab" in the subject "aab". The use of the backtracking con-
6389 Consider, for example, the pattern \d+foo when applied to the subject
6414 match, if anchored at the current point in the subject string.
6531 pattern in the current subject string, rather than anything matching
6609 kinds: those that look ahead of the current position in the subject
6727 end of subject strings. Consider a simple pattern such as
6732 proceeds from left to right, PCRE will look for each "a" in the subject
6760 the subject string. First there is a check that the previous three
6836 first set of parentheses matched. If they did, that is, if subject
6918 it tests for the presence of at least one letter in the subject. If a
6919 letter is found, the subject is matched against the first alternative;
7038 so many different ways the + and * repeats can carve up the subject,
7076 the subject string, it is never re-entered, even if it contains untried
7087 Consider the subject string "abcba":
7141 the subject is "ababa", PCRE finds the palindrome "aba" at the start,
7279 and subject to change or removal in a future version of Perl". It goes
7310 may know the minimum length of matching subject, or that a particular
7403 match attempt that started at the letter "X" in the subject. Subsequent
7462 optimization skips along the subject to "a" before applying the pattern
7474 the subject if there is a later matching failure that causes backtrack-
7494 character, but to the position in the subject where (*SKIP) was encoun-
7500 If the subject is "aaaac...", after the first match attempt fails
7513 "bumpalong" advance is to the subject position that corresponds to that
7570 If the subject is "ba", this pattern does not match. Because .*? is
7615 If the subject is "abac", Perl matches, but PCRE fails because the
7886 ^ start of subject
7888 \A start of subject
7889 $ end of subject
7890 also before newline at end of subject
7892 \Z end of subject
7893 also before newline at end of subject
7894 \z end of subject
7895 \G first matching position in subject
8107 and any subject strings that are matched against it are treated as
8119 any subject strings that are matched against it are treated as UTF-16
8176 mance, for example in the case of a long subject string that is being
8178 time or at run time, PCRE assumes that the pattern or subject it is
8183 the check for the pattern; it does not also apply to subject strings.
8184 If you want to disable the check for a subject string you must pass
8208 run time, PCRE assumes that the pattern or subject it is given (respec-
8231 run time, PCRE assumes that the pattern or subject it is given (respec-
8321 positions in the subject, even for a single call. Therefore, if the
8322 subject string is very long, it may still pay to use JIT for one-off
8464 many times as you like for matching different subject strings.
8681 rc = pcre_exec(re, extra, subject, length, 0, 0, ovector, 30);
8706 ple, if the subject pointer is NULL, or its length is negative, an
8708 UTF subject string is tested for validity. In the interests of speed,
8771 In normal use of PCRE, if the subject string that is passed to a match-
8789 can also be useful when the subject string is very long and is not all
8814 abandons matching immediately if it is not present in the subject
8815 string. This optimization cannot be used for a subject string that
8825 pcre[16|32]_exec() when the end of the subject string is reached suc-
8827 needed. However, at least one character in the subject must have been
8834 subject.
8839 to the end of the subject so that a substring can easily be identified.
8852 subject string is "xyzabc12", the first two offsets after a partial
8870 the subject string is potentially complete. For example, \z, \Z, and $
8871 match at the end of the subject, as normal, and for \b and \B the end
8872 of the subject is treated as a non-alphanumeric.
8879 If this is matched against the subject string "abc123dog", both alter-
8880 natives fail to match, but the end of the subject is reached during
8893 the supplied subject string may not be the true end of the available
8895 subject, the result is PCRE_ERROR_PARTIAL, provided that at least one
8896 character in the subject has been inspected.
8898 Setting PCRE_PARTIAL_HARD also affects the way UTF-8 and UTF-16 subject
8901 special case of a truncated character at the end of the subject,
8935 The DFA functions move along the subject string character by character,
8937 ously. If the end of the subject is reached before the end of the pat-
8971 the subject string is "the cat", the comparison of the final "t" with a
8974 subject when the last character is a letter, so a complete match is
9028 is possible to continue the match by providing additional subject data
9042 The first call has "23ja" as the subject, and requests partial match-
9043 ing; the second call has "n05" as the subject for the continued
9057 subject and try a new complete match.
9061 This facility can be used to pass very long subject strings to the DFA
9070 data must be added to the previous subject string, and the entire match
9075 not treat the end of a segment as the end of the subject when matching
9102 to pass the PCRE_NOTBOL option when the subject string for any call
9116 start of the subject, fewer characters may be present; in that case all
9153 4. Matching a subject string that is split into multiple segments may
9161 been found, continuation to a new subject segment is no longer possi-
9179 the subject is presented to a DFA matching function in several parts
9203 If the first part of the subject is "ABC123", a partial match of the
9206 point in the subject string. Attempting to continue with the string
9208 match at one point in the subject are remembered. The problem arises
9487 that are not the subject of a backreference, and the PCRE_DOTALL option
9489 only at the start of a subject string. However, if PCRE_DOTALL is not
9491 does not then match a newline, and if the subject string contains new-
9497 matches the subject "first\nand second" (where \n stands for a newline
9500 the subject.
9502 If you are using such a pattern with subject strings that do not con-
9505 ing. That saves PCRE from having to scan along the subject looking for
9606 sions themselves are still those of Perl, subject to the setting of
9681 subject string is the Perl way, not the POSIX way. Note that setting
9735 (but see REG_STARTEND below), subject to the options in eflags. These
10136 subject to re-matching. For example:
10180 it against the subject string in its second argument. No PCRE options
10182 the program outputs the portion of the subject that matched, together
10187 subject string. The logic is a little bit tricky because of the possi-
10295 The maximum length of a subject string is the largest positive number
10299 the size of a subject string that can be processed by certain patterns.
10394 ing long subject strings is to write repeated parenthesized subpatterns
10432 subject string. This is done by calling pcre[16|32]_exec() repeatedly