You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regex that should not match anything sometimes matches the entire file. Seems to happen if a very long match (about 10000 characters) is followed by a mismatch.
Steps to Reproduce the Issue
Create a line containing arbitrary text of length 14138 (seems to be a "magical" number); make sure that your text does NOT contain one certain character, e.g. an underscore "_"
Search for RegEx ..*_ (any character, any number of any characters, underscore)
=> Nothing is found (which is the correct behaviour).
Add one character to the long line (now length 14139).
Search for the same Regex => ERROR: The entire text is found
More Information
The number 14138 seems not to be a "constant"; it may differ slightly if the file contains additional lines. If you can't reproduce the error, simply add some more characters to the long line.
Apparently, always the entire file (including newlines) is found if the error occurs, although the RegEx should not match newline characters.
The RegEx above is just a simple example. In my case, the error occurred quite often with much more complicated RegEx's. The error pattern seems to be always the same: At least two subsequent "fuzzy" elements (in our example . and .*) produce a very long match, but at the end, there is a mismatch (in our case the missing underscore).
The text was updated successfully, but these errors were encountered:
Description of the Issue
Regex that should not match anything sometimes matches the entire file. Seems to happen if a very long match (about 10000 characters) is followed by a mismatch.
Steps to Reproduce the Issue
=> Nothing is found (which is the correct behaviour).
More Information
The text was updated successfully, but these errors were encountered: