About 50 results
Open links in new tab
  1. python - How to filter rows in pandas by regex - Stack Overflow

    Mar 11, 2013 · 7 Using Python's built-in ability to write lambda expressions, we could filter by an arbitrary regex operation as follows:

  2. How do I search for a pattern within a text file using Python combining ...

    May 7, 2012 · How do I search for a pattern within a text file using Python combining regex & string/file operations and store instances of the pattern? Asked 13 years, 9 months ago Modified 6 years, 8 …

  3. python - How do I search directories and find files that match regex ...

    25 I recently started getting into Python and I am having a hard time searching through directories and matching files based on a regex that I have created. Basically I want it to scan through all the …

  4. Match a line with multiple regex using Python - Stack Overflow

    Jan 17, 2012 · You can use the built in functions any (or all if all regexes have to match) and a Generator expression to cycle through all the regex objects. any (regex.match(line) for regex in …

  5. regex - Python dictionary search values for keys using regular ...

    Aug 14, 2014 · Python dictionary search values for keys using regular expression Asked 13 years, 8 months ago Modified 4 months ago Viewed 121k times

  6. python .replace () regex - Stack Overflow

    119 In order to replace text using regular expression use the re.sub function: sub (pattern, repl, string [, count, flags]) It will replace non-everlaping instances of pattern by the text passed as string.

  7. python - Structural pattern matching using regex - Stack Overflow

    Jan 12, 2022 · For regex 1, 2 and 3, I've tried string regex patterns and also re.compile objects but it doesn't seem to work. I have been trying to find examples of this over the internet but can't seem to …

  8. Simple way of extracting a value from a file using regex (python)

    Aug 18, 2020 · Hi I’m currently learning Regex in python, made a simple exercise for myself, where I have a file full of lines of data, and I only want to extract a value from each line that has ‘outer’ in it. fi...

  9. How to fix "SyntaxWarning: invalid escape sequence" in Python?

    I use the following prompt successfully on https://duck.ai to write a script: write Python program using libcst to automatically add r to docstrings that would raise syntax warning (invalid escape sequence) …

  10. Extract text with special characters using regex python

    Mar 2, 2022 · Extract text with special characters using regex python Asked 3 years, 11 months ago Modified 3 years, 11 months ago Viewed 3k times