Lines Matching refs:pattern

18     involved. For example, in this pattern: /(?1)()((((((\1++))\x85)+)|))/.
30 current group, for example in this pattern: /(?|(\k'Pm')|(?'Pm'))/, caused
58 13. In an EBCDIC environment, \a in a pattern was converted to the ASCII
74 18. A pattern with an unmatched closing parenthesis that contained a backward
76 overflow. And example pattern is: /(?=di(?<=(?1))|(?=(.))))/.
78 19. JIT should return with error when the compiled pattern requires more stack
104 27. Similar to (4) above: in a pattern with duplicated named groups and an
118 offsets in the pattern.
125 later in the pattern uses code that is very hacked about and error-prone.
188 pattern /(x)|((*ACCEPT))/ when matched against "abcd".
193 3. If a pattern in pcretest input had the P (POSIX) modifier followed by an
207 7. A UTF pattern containing a "not" match of a non-ASCII character and a
210 8. When a pattern is compiled, it remembers the highest back reference so that
213 capture having happened, such as, for example in the pattern
223 for being set in a conditional) that occurred in a part of the pattern where
224 PCRE_DUPNAMES was not set caused the amount of memory needed for the pattern
235 likely. The pattern (?(?=0)?)+ is an example that caused this. Perl allows
237 so the above pattern is faulted by Perl. PCRE has now been changed so that
248 pattern.
254 14. A pattern such as "((?2){0,1999}())?", which has a group containing a
263 23. A pattern such as "((?+1)(\1))/" containing a forward reference subroutine
274 25. A pattern such as /(?i)[A-`]/, where characters in the other case are
282 27. The pattern /(?(?!)^)/ caused references to random memory. This bug was
290 29. For some types of pattern, for example /Z*(|d*){216}/, the auto-
295 30. A pattern such as /(*UTF)[\S\V\H]/, which contains a negated special class
299 compile the pattern, leading to a buffer overflow. This bug was discovered
302 31. A pattern such as /((?2)+)((?1))/ which has mutual recursion nested inside
306 32. A pattern such as /(?1)(?#?'){8}(a)/ which had a parenthesized comment
311 33. The illegal pattern /(?(?<E>.*!.*)?)/ was not being diagnosed as missing an
316 34. A pattern such as /X((?2)()*+){2}+/ which has a possessive quantifier with
325 36. The use of \K in a positive lookbehind assertion in a non-anchored pattern
331 and a subsequent item in the pattern caused a non-match, backtracking over
338 a very long time if mutual recursion was present many times in a pattern,
387 8. Fixed a bug that was incorrectly auto-possessifying \w+ in the pattern
394 to hold a pattern to be incorrectly computed (too small) when there were
400 confused. For example, in this pattern:
407 12. A pattern such as /^s?c/mi8 where the optional character has more than
411 13. When a pattern starting with \s was studied, VT was not included in the
418 15. If a pattern that started with a caseless match for a character with more
436 20. A pattern such as /((?(R)a|(?1)))+/, which contains a recursion within a
459 4. A pattern such as (?=ab\K) that uses \K in an assertion can set the start
496 and there is no \K in the pattern. JIT should avoid empty match checks in
509 14. Improve pattern prefix search by a simplified Boyer-Moore algorithm in JIT.
599 8. Implemented PCRE_INFO_MATCH_EMPTY, which yields 1 if the pattern can match
606 (a) If the rest of the pattern did not match after a maximal run of
618 item was recorded. For example, the pattern (?(?=ab)ab) recorded "a" as a
640 same name now checks them in the order in which they appear in the pattern.
651 (*NO_AUTO_POSSESS) at the start of a pattern.
690 25. If PCRE_AUTO_CALLOUT and PCRE_UCP were set for a pattern that contained
840 are no lookbehinds in the pattern, \A might match incorrectly at the start
857 22. When a pattern was compiled with automatic callouts (PCRE_AUTO_CALLOUT) and
900 33. An opening parenthesis in a MARK/PRUNE/SKIP/THEN name in a pattern that
908 36. In the interpreter, maximizing pattern repetitions for characters and
915 of the compiled pattern block, expand the flags field from 16 to 32 bits
921 with a pattern such as ^$. It has taken 4 years for anybody to notice! The
958 atomic brackets at the start of a pattern, or where there was a subsequent
969 (b) An error is given if a pattern is too long.
1073 provide fast pattern matching, so several sanity checks are not performed.
1099 25. (*UTF) can now be used to start a pattern in any of the three libraries.
1130 (d) When newline was set to CRLF, a pattern such as /a$/ did not recognize
1199 27. If a pattern contains capturing parentheses that are not used in a match,
1269 4. For a non-anchored pattern, if (*SKIP) was given with a name that did not
1283 command "pattern=`printf 'xxx\r\njkl'`" was run. The pattern is now taken
1294 11. The pattern /(?=(*:x))(q|)/ matches an empty string, and returns the mark
1295 "x". The similar pattern /(?=(*:x))((*:y)q|)/ did not return a mark at all.
1296 Oddly, Perl behaves the same way. PCRE has been fixed so that this pattern
1380 16. A repeated forward reference in a pattern such as (a)(?2){2}(.) was
1391 is a non-match for a non-anchored pattern. For example, if
1400 19. If the /S+ option was used in pcretest to study a pattern using JIT,
1421 "starts with" bytes for the pattern, the data written to the file (though
1442 2. If a pattern such as /(a)b|ac/ is matched against "ac", there is no
1453 3. Related to (2) above: when there are more back references in a pattern than
1476 7. If a pattern such as /a(*SKIP)c|b(*ACCEPT)|/ was studied, it stopped
1481 so that no minimum is registered for a pattern that contains *ACCEPT.
1489 10. A pathological pattern such as /(*ACCEPT)a/ was miscompiled, thinking that
1494 pattern contains any instances of (*THEN). If it does not, the old
1508 15. Consider the pattern /A (B(*THEN)C) | D/ where A, B, C, and D are complex
1509 pattern fragments (but not containing any | characters). If A and B are
1597 slightly. This change also fixes an incompatibility with Perl: the pattern
1637 pattern had matched an empty string, and so incorrectly returned a no
1647 18. If a pattern containing \R was studied, it was assumed that \R always
1651 19. If a pattern containing (*ACCEPT) was studied, the minimum subject length
1654 20. If /S is present twice on a test pattern in pcretest input, it now
1686 26. When studying a pattern that contained subroutine calls or assertions,
1704 slots at the end of the pattern, which are documented as being -1, but are
1714 33. If --only-matching or --colour was set on a pcregrep call whose pattern
1750 41. A pattern such as /(?(R)a+|(?R)b)/ is quite safe, as the recursion can
1753 pattern in sufficient detail. The compile time test no longer happens when
1785 46. The pattern /.(*F)/, when applied to "abc" with PCRE_PARTIAL_HARD, gave a
1789 47. The pattern /f.*/8s, when applied to "for" with PCRE_PARTIAL_HARD, gave a
1793 48. For a pattern such as /\babc|\bdef/ pcre_study() was failing to set up the
1814 -M (multiline) and the pattern match finished with a line ending.
1816 5. In pcregrep, when a pattern that ended with a literal newline sequence was
1841 2. (*COMMIT) was not overriding (*THEN), as it does in Perl. In a pattern
1897 13. Imitating Perl's /g action for multiple matches is tricky when the pattern
1944 20. Recognize (*NO_START_OPT) at the start of a pattern to set the PCRE_NO_
1993 use Unicode properties. (*UCP) at the start of a pattern can be used to set
1999 11. In UTF-8 mode, if a pattern that was compiled with PCRE_CASELESS was
2005 12. If a pattern that was studied started with a repeated Unicode property
2050 21. A pattern such as (?&t)(?#()(?(DEFINE)(?<t>a)) which has a forward
2070 5. A pattern such as (?&t)*+(?(DEFINE)(?<t>.)) which has a possessive
2107 13. A pattern such as (?P<L1>(?P<L2>0)|(?P>L2)(?P>L1)) in which the only other
2124 1. If a pattern contained a conditional subpattern with only one branch (in
2130 the pattern is reset in the first branch, pcre_compile() failed with
2136 3. A pattern such as ^(?!a(*SKIP)b) where a negative assertion contained one
2138 assertion pattern did not match (meaning that the assertion was true), it
2143 assertion subpattern, including such a pattern used as a condition,
2198 most of the time, it *can* run out if it is given a pattern that contains a
2211 in a UTF-8 pattern where \W was quantified with a minimum of 3.
2234 specification, with a corresponding code fix. A pattern such as
2237 match that pattern. Interestingly, Perl (at least up to 5.11.3) has the
2241 moved on to the rest of the pattern, a later failure that backtracks into
2274 5. The command line items --regex=pattern and --regexp=pattern were not
2275 recognized by pcregrep, which required --regex pattern or --regexp pattern
2289 8. A pattern such as /\x{123}{2,2}+/8 was incorrectly compiled; the trigger
2296 9. The restrictions on what a pattern can contain when partial matching is
2317 if the pattern had a "must contain" character that was already found in the
2319 example, with the pattern /dog.(body)?/, the "must contain" character is
2325 first character of the match. This makes a difference only if the pattern
2355 subpattern. An example of a crashing pattern is /(?&A)(([^m])(?<A>))/.
2361 /g option in pcretest when the pattern contains \K, which makes it possible
2362 to have an empty string match not at the start, even when the pattern is
2379 pattern matches a fixed length string. PCRE did not allow this; now it
2383 length of subject string that was needed in order to match a given pattern.
2406 conditional pattern, either for a subpattern having been matched, or for
2407 recursion in such a pattern, all the associated numbered subpatterns are
2444 7. A pattern that could match an empty string could cause pcregrep to loop; it
2450 8. The pattern (?(?=.*b)b|^) was incorrectly compiled as "match must be at
2455 9. If auto-callout was enabled in a pattern with a conditional group whose
2490 20. If a pattern that was compiled with callouts was matched using pcre_dfa_
2520 taking into account the duplicate group numbers. A pattern such as
2530 28. Added support for (*UTF8) at the start of a pattern.
2549 3. Change 12 for 7.7 introduced a bug in pcre_study() when a pattern contained
2551 or the function might crash, depending on the pattern.
2577 11. An option change at the start of a pattern that had top-level alternatives
2585 12. For a pattern where the match had to start at the beginning or immediately
2666 was called as a subroutine from elsewhere in the pattern, things went wrong
2668 pattern, with a new opcode that causes them to be skipped at execution
2686 14. A pattern such as /(?2)[]a()b](abc)/ which had a forward reference to a
2689 non-existent subpattern". Fortunately, when the pattern did exist, the
2799 7. Patterns such as (?(1)a|b) (a pattern that contains fewer subpatterns
2847 15. The pattern (?=something)(?R) was not being diagnosed as a potentially
2882 22. In UTF-8 mode, with newline set to "any", a pattern such as .*a.*=.b.*
2884 UTF-8 newline character). The key issue is that the pattern starts .*;
2923 3. The appearance of (?J) at the start of a pattern set the DUPNAMES option,
2997 2. The pattern .*$ when run in not-DOTALL UTF-8 mode with newline=any failed
3017 limit also applies to "virtual nesting" when a pattern is recursive, and in
3040 Change 7.0/17 (the refactoring of the way the pattern size is computed) has
3044 the compiled pattern, which depends on the LINK_SIZE setting.
3065 12. A pattern like \X?\d or \P{L}?\d in non-UTF-8 mode could cause a backtrack
3087 18. An unterminated class in a pattern like (?1)\c[ with a "forward reference"
3090 19. A pattern like (?:[\PPa*]*){8,} which had an "extended class" (one with
3095 20. Debugging a pattern containing \p or \P could cause a crash. For example,
3106 present in the pattern. These operators have additional parameters compared
3116 (c) A pattern such as \p{Yi}+(\P{Yi}+)(?1) could give an incorrect
3119 (d) A pattern like (\P{Yi}{2}\277)? could loop at compile time.
3133 break. For example, the unstudied pattern [\r\n]A does not match the string
3135 characters after failing to match at the start. However, the pattern \nA
3140 pattern, and if so, 7.0/46 no longer applies. As part of this change,
3142 pattern has explicit CR or LF references.
3144 29. Added (*CR) etc for changing newline setting at start of pattern.
3195 8. A pattern such as (.*(.)?)* caused pcre_exec() to fail by either not
3199 9. A pattern with a very large number of alternatives (more than several
3203 alternatives. The 1000-alternative test pattern now uses 12 bytes of
3334 15. In multiline mode when the newline sequence was set to "any", the pattern
3337 ending, and so does not match in that case. It's only a pattern such as ^$
3348 19. In pcretest, if the pattern /(?m)^$/g<any> was matched against the string
3386 (a) When it is outputting text in the compiled version of a pattern, bytes
3394 required for a compiled pattern when options that changed within the
3395 pattern affected the logic of the preliminary scan that determines the
3462 16. pcretest is supposed to handle any length of pattern and data line (as one
3464 necessary. This feature was broken for very long pattern lines, leading to
3465 a string of junk being passed to pcre_compile() if the pattern was longer
3469 amount of memory needed for a compiled pattern. Previously, there was code
3470 that made a preliminary scan of the pattern in order to do this. That was
3481 runs more slowly than before (30% or more, depending on the pattern). I
3484 18. Fixed a minor bug in pcretest: if a pattern line was not terminated by a
3486 pattern that set a locale (followed by /Lsomething), pcretest crashed.
3500 a subpattern (or the entire pattern) that was being tested for matching an
3502 For example, the pattern (?>\x{100}*)\d(?R) provoked this error
3505 22. The pcretest program now has a new pattern option /B and a command line
3506 option -b, which is equivalent to adding /B to every pattern. This causes
3531 28. A pattern such as (?=(\w+))\1: which simulates an atomic group using a
3547 the pattern for the relevant set of parentheses. This search went wrong
3600 this code in non-simple cases. For a pattern such as ^(a()*)* matched
3638 46. For an unanchored pattern, if a match attempt fails at the start of a
3663 pattern, but PCRE should not loop if you do not (it no longer does).
3696 the size of the memory block for a compiled pattern. By supplying a very
3703 the compiled pattern. The size of memory for this was computed from the
3718 pattern could run off the end of the subject. For example, the pattern
3729 18. A valid (though odd) pattern that looked like a POSIX character
3733 the pattern terminated after [[ but there just happened to be a sequence of
3742 is, the pattern adapts to the data and automatically switches to
3749 Thus, in Perl, the pattern /\500/ actually matches \100 but the pattern
3766 with the documentation.] However, when a pattern was studied with
3772 dependency changed within the pattern. This was once needed for "required
3792 the space required for the compiled pattern went wrong and gave too small a
3830 point. This could lead to incorrect results. For example, with the pattern
3941 11. The POSIX flag REG_NOSUB is now supported. When a pattern that was compiled
4113 5. Named capturing subpatterns were not being correctly counted when a pattern
4116 compiled pattern went wrong, leading to an overflow error. (b) Numerical
4135 3. A (silly) pattern starting with (?i)(?-i) caused an internal space
4197 8. Added the PCRE_FIRSTLINE option. This constrains an unanchored pattern to
4199 the /f option on a pattern can be used to set this.
4232 option but starts with a hyphen. Could be a pattern or a path name
4320 next_item_length. These contain the offset in the pattern to the next match
4324 insertion of callouts before each pattern item. Added the /C option to
4358 9. Matching the pattern "\b.*?" against "ab cd", starting at offset 1, failed
4362 preceding ".*" at the start, unless the pattern required a fixed first
4363 character. This was a failing pattern: "(?!.bcd).*". The bug is now fixed.
4382 pattern) showed incorrect output for anything following an extended class
4391 compiled pattern.
4405 20. Extended pcretest with 3 new pattern features:
4407 (i) A pattern option of the form ">rest-of-line" causes pcretest to
4408 write the compiled pattern to the file whose name is "rest-of-line".
4411 written too. After writing, pcretest reads a new pattern.
4413 (ii) If, instead of a pattern, "<rest-of-line" is given, pcretest reads a
4414 compiled pattern from the given file. There must not be any
4416 pcretest will instead treat the initial "<" as a pattern delimiter.
4417 After reading in the pattern, pcretest goes on to read data lines as
4420 (iii) The F pattern option causes pcretest to flip the bytes in the 32-bit
4421 and 16-bit fields in a compiled pattern, to simulate a pattern that
4481 this is necessary because there may be backward assertions in the pattern.
4531 14. A pattern such as /[ab]{1,3}+/ failed to compile, giving the error
4539 16. If a pattern that contained .* following optional items at the start was
4543 this pattern is that a match can start with any character.
4550 127 and 255 was not handled correctly if the compiled pattern was studied.
4568 7. If a pattern was successfully studied, and the -d (or /D) flag was given to
4618 hexadecimal digits in the pattern. This is silly, because it handles
4640 6. A lookbehind at the start of a pattern in UTF-8 mode could also cause PCRE
4643 7. A lookbehind in a pattern matched in non-UTF-8 mode on a PCRE compiled with
4736 first character of an anchored pattern as "needed", thus provoking a search
4737 right along the subject, even when the first match of the pattern was going to
4739 follows something in the pattern that is of non-fixed length. Thus, it still
4769 were backward compatible, and made the (?i) apply to the whole pattern, as if
4772 finds options settings right at the start of the pattern, it extracts them into
4803 documentation calls "once-only subpatterns". A pattern such as x*+ is the same
4809 13. A change of greediness default within a pattern was not taking effect at
4843 reading past the end of the pattern in cases such as /[abcd/.
4864 start of line for a non-DOTALL pattern) when a pattern started with (.*) and
4872 non-anchored pattern, and for finding a character that is required later in the
4912 32. The default maximum size of a compiled pattern is 64K. There have been a
4914 storing of links as offsets within the compiled pattern. It defaults to 2-byte
5313 1. If the pattern /((Z)+|A)*/ was matched agained ZABCDEFG it matched Z instead
5319 2. The pcretest program was not imitating Perl correctly for the pattern /a*/g
5366 3. Fix pcretest so that it behaves even more like Perl for /g when the pattern
5370 pattern. Perl treats empty patterns specially - it reuses the most recent
5371 pattern, which is not what we want. Replace // by /(?#)/ in order to avoid this
5407 1. When startoffset was not zero and the pattern began with ".*", PCRE was not
5448 8. If a pattern like /"([^\\"]+|\\.)*"/ is applied in the normal way to a
5452 character in the pattern, and pre-searching the subject to ensure it is present
5480 it wasn't noticing that a match for a pattern such as /\bxyz/ has to start with
5502 computation of the store needed to hold the pattern was incorrect (too large).
5507 pattern. Made -m a synonym of -s (which does this globally) for compatibility.
5525 pattern. Locked out the use of \ as a delimiter. If \ immediately follows
5526 the final delimiter, add \ to the end of the pattern (to test the error).
5588 (?(cond)re|re) conditional pattern matching
5622 latter must appear before anything that relies on it in the pattern.
5628 1. A pattern such as /((a)*)*/ was not being diagnosed as in error (unlimited
5794 3. Fixed serious bug. If a pattern had a back reference, but the call to
5821 pattern).
5887 the pattern were in upper case.