About 3,710,000 results
Open links in new tab
  1. regex - Python extract pattern matches - Stack Overflow

    Mar 11, 2013 · Python extract pattern matches Asked 12 years, 7 months ago Modified 2 years ago Viewed 475k times

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

    How do I check if a string matches the following pattern? Uppercase letter, number(s), uppercase letter, number(s)... Example: These would match: A1B2 B10L1 C1N200J1 These wouldn't ('^' …

  3. python - glob exclude pattern - Stack Overflow

    Dec 17, 2013 · The pattern rules for glob are not regular expressions. Instead, they follow standard Unix path expansion rules. There are only a few special characters: two different wild …

  4. Python glob multiple filetypes - Stack Overflow

    Dec 31, 2010 · Yet another solution (use glob to get paths using multiple match patterns and combine all paths into a single list using reduce and add): import functools, glob, operator

  5. Python: Find pattern in a string - Stack Overflow

    I am trying to find a way to match a pattern p in a string s in python. s = 'abccba' ss = 'facebookgooglemsmsgooglefacebook' p = 'xyzzyx' # s, p -> a, z # s and p ...

  6. python - Matching multiple regex patterns with the alternation …

    Jan 6, 2013 · Matching multiple regex patterns with the alternation operator? Asked 12 years, 9 months ago Modified 11 years ago Viewed 131k times

  7. How to print a Triangle Pyramid pattern using a for loop in Python ...

    How to print a Triangle Pyramid pattern using a for loop in Python? Asked 6 years, 10 months ago Modified 2 years, 8 months ago Viewed 25k times

  8. What does 'r' mean before a Regex pattern? - Stack Overflow

    The solution is to use Python’s raw string notation for regular expression patterns; backslashes are not handled in any special way in a string literal prefixed with 'r'. So r"\n" is a two-character …

  9. What is the best way of implementing a singleton in Python?

    Jun 10, 2020 · When you call logger with Logger(), Python first asks the metaclass of Logger, Singleton, what to do, allowing instance creation to be pre-empted. This process is the same …

  10. python - How to replace multiple substrings of a string ... - Stack ...

    Careful: Python dictionaries don't have a reliable order for iteration. This solution only solves your problem if: order of replacements is irrelevant it's ok for a replacement to change the results of …