About 14,000,000 results
Open links in new tab
  1. regex - Carets in Regular Expressions - Stack Overflow

    Jun 1, 2017 · Specifically when does ^ mean "match start" and when does it mean "not the following" in regular expressions? From the Wikipedia article and other references, I've …

  2. Regex: ?: notation (Question mark and colon notation)

    Dec 8, 2018 · The regex compiles fine, and there are already JUnit tests that show how it works. It's just that I'm a bit confused about why the first question mark and colon are there.

  3. regex - Matching up to the first occurrence of a character with a ...

    Be aware that the first ^ in this answer gives the regex a completely different meaning: It makes the regular expression look only for matches starting from the beginning of the string.

  4. regex - What are ^.* and .*$ in regular expressions? - Stack Overflow

    In case it is JS it indicates the start and end of the regex, like quotes for strings. stackoverflow.com/questions/15661969/…

  5. regex - What is the difference between .*? and .* regular …

    Repetition in regex by default is greedy: they try to match as many reps as possible, and when this doesn't work and they have to backtrack, they try to match one fewer rep at a time, until a …

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

    Apr 7, 2011 · @VaradBhatnagar You would need to escape the ? character in your regular expression. As an example in Clojure, if you wanted to match the string foo?, you could use …

  7. symbols - What is the meaning of + in a regex? - Stack Overflow

    Oct 3, 2010 · Now, when the regex engine tries to match against aaaaaaaab, the .* will again consume the entire string. However, since the engine will have reached the end of the string …

  8. Regex that accepts only numbers (0-9) and NO characters

    By putting ^ at the beginning of your regex and $ at the end, you ensure that no other characters are allowed before or after your regex. For example, the regex [0-9] matches the strings "9" as …

  9. regex - How is the AND/OR operator represented as in Regular ...

    I now try to match the string given by the user with the following, automatically created, regex expression: ^(part1|part2)$ This only returns answer 1 and 2 as correct while answer 3 would …

  10. regex - Regular expression to match string starting with a specific ...

    Nov 13, 2021 · How do I create a regular expression to match a word at the beginning of a string? We are looking to match stop at the beginning of a string and anything can follow it. For …