-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Possible bad literal extraction #93
Copy link
Copy link
Closed
Labels
bugA bug.A bug.
Description
I was trying to search for IP addresses and ran into an odd problem. I tried the expression '(\d{1,3}\.){3}\d{1,3}' and found no matches. I changed from a fixed repetition of the subgroup to one or more - '(\d{1,3}\.)+\d{1,3}' - and got matches. Using the --debug flag I see that the first case looks for the wrong literal:
DEBUG:grep::literals: required literal found: "..."
The second case only looks for a single . as expected.
Is this a bug in the regex parsing or am I doing something wrong?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugA bug.A bug.