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
I am having a weird problem with regex. I am trying to get the tokens
that match the pattern below, but it is not working only for a specific
case. I do this for many lines of text, and it works, except for the
string '1214578800'.
Any idea of what is happening? Is it a problem of my code or a bug in
regular expressions?
It's not a Python bug: your regex is invalid. When the regex
finds '1211641200', it reads >,'1211641200',< includind the last
comma. So the cursor will be at the apostrophe before 1214578800:
...200','121457...
--------^
You have to change your regex to not check the comma or use a
non-matching group like (?<=,) and (?=[,)]).
Note: you're using [,|)] which matchs >,<, >|<, and >)<. I guess that
you wanted [,)].
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: