About 70,000 results
Open links in new tab
  1. python .replace() regex - Stack Overflow

    I was pretty much assuming this was a throwaway script - both the regex approach and the string search approach have all sorts of inputs they'll fail on. For anything in production, I would want to be doing some sort of more sophisticated parsing than either regex or …

  2. python: number range to regex matching string - Stack Overflow

    Jul 24, 2013 · Other numbers (represented as strings) will be input into my system and I need to use regex to match this against the 'range regex' to see if the number string falls either on or between start_number and end_number. For example: start_number = 99519000; end_number = 99519099; therefore. expression = "^995190[0-9][0-9]$"

  3. regex - Regular Expressions: Is there an AND operator? - Stack …

    In regex in general, ^ is negation only at the beginning of a character class. Unless CMake is doing something really funky (to the point where calling their pattern matching language "regex" could be regarded as misleading or incorrect) I'm guessing the fact that it worked for you was an isolated accident. –

  4. regex - Python and "re" - Stack Overflow

    A tutorial I have on Regex in python explains how to use the re module in python, I wanted to grab the URL out of an A tag so knowing Regex I wrote the correct expression and tested it in my regex testing app of choice and ensured it worked. When placed into python it failed:

  5. Python: How to use RegEx in an if statement? - Stack Overflow

    import re if re.match(regex, content): blah.. You could also use re.search depending on how you want it to match.

  6. regex - Python Regular Expressions to NFA - Stack Overflow

    Oct 15, 2018 · I am currently using python's re module to search and capture groups. I've list of regular expressions which I have to compile and match against a large dataset which causes performance issues. Ex...

  7. regex - Question marks in regular expressions - Stack Overflow

    Apr 7, 2011 · Enter your regex: Enter input string to search: xx I found the text "" starting at index 0 and ending at index 0. I found the text "" starting at index 1 and ending at index 1. I found the text "" starting at index 2 and ending at index 2.

  8. regex - Learning Regular Expressions - Stack Overflow

    Aug 7, 2008 · Perl: YAPE: Regex Explain; Regex Coach (engine backed by CL-PPCRE) RegexPal (for JavaScript) Regular Expressions Online Tester; Regex Buddy; Regex 101 (for PCRE, JavaScript, Python, Golang, Java 8) I Hate Regex; Visual RegExp; Expresso (for .NET) Rubular (for Ruby) Regular Expression Library (Predefined …

  9. How to use regex with optional characters in python?

    Mar 27, 2012 · Read up on the Python RegEx library. The link answers your question and explains why. However, to match a digit followed by more digits with an optional decimal, you can use. re.compile("(\d+(\.\d+)?)") In this example, the ? after the .\d+ capture group specifies that this portion is optional. Example

  10. python regex with optional group - Stack Overflow

    Jun 3, 2012 · For more information you can see the python re docs search for greedy. As a side note if you pass the re.VERBOSE flag into re.compile then it will ignore whitespace within your string meaning you can structure it as. regex = re.compile(r'^ (\[) (\S+?) (\/?) (\][ST]$) ', re.VERBOSE) which I found quite helpful when learning regex.

Refresh