About 420,000 results
Open links in new tab
  1. python - How can I make a regex match the entire string ... - Stack ...

    How can I make a regex match the entire string? Asked 8 years, 5 months ago Modified 3 years, 2 months ago Viewed 129k times

  2. python - Check if string matches pattern - Stack Overflow

    From the docs on re.match: If zero or more characters at the beginning of string match the regular expression pattern. I just spent like 30 minutes trying to understand why I couldn't match …

  3. regex - Python extract pattern matches - Stack Overflow

    Mar 11, 2013 · If this is the case, having span indexes for your match is helpful and I'd recommend using re.finditer. As a shortcut, you know the name part of your regex is length 5 …

  4. regex - Match groups in Python - Stack Overflow

    Is there a way in Python to access match groups without explicitly creating a match object (or another way to beautify the example below)? Here is an example to clarify my motivation for …

  5. Looping through python regex matches - Stack Overflow

    Looping through python regex matches Asked 13 years, 2 months ago Modified 1 year, 8 months ago Viewed 142k times

  6. Python Regex - How to Get Positions and Values of Matches

    Jan 11, 2018 · 168 How can I get the start and end positions of all matches using the re module? For example given the pattern r'[a-z]' and the string 'a1b2c3d4' I'd want to get the positions …

  7. regex - How can I find all matches to a regular expression in …

    Jan 17, 2024 · 1 If you are interested in getting all matches (including overlapping matches, unlike @Amber's answer), there is a new library called REmatch which is specifically designed to …

  8. python - regex to match starting numbering or alphabet bullets …

    Aug 21, 2024 · regex to match starting numbering or alphabet bullets like (a) Asked 1 year, 4 months ago Modified 1 year, 3 months ago Viewed 132 times

  9. python - Regular expression for matching numbers and strings

    Apr 22, 2014 · The problem with your regex is that \D can be anything except a number, so it will wrongly match strings with special characters in that position, and fail to match strings with …

  10. python - How to regex match all strings except when the pattern …

    Jul 23, 2025 · How to regex match all strings except when the pattern occurs at a specific position? Asked 4 months ago Modified 2 months ago Viewed 288 times