About 50 results
Open links in new tab
  1. How can I validate an email address using a regular expression?

    Over the years I have slowly developed a regular expression that validates most email addresses correctly, assuming they don't use an IP address as the server part. I use it in several PHP programs...

  2. regex - Regular Expressions- Match Anything - Stack Overflow

    How do I make an expression to match absolutely anything (including whitespaces)? Example: Regex: I bought _____ sheep. Matches: I bought sheep. I bought a sheep. I bought five sheep. I tried usi...

  3. validation - RegEx for matching UK Postcodes - Stack Overflow

    I discovered that the UK Government's regex pattern is incorrect and fails to properly validate some postcodes. Unfortunately, many of the answers here are based on this incorrect pattern. I'll outline …

  4. Using RegEx in SQL Server - Stack Overflow

    Jan 19, 2012 · 139 I'm looking how to replace/encode text using RegEx based on RegEx settings/params below: ... I have seen some examples on RegEx, but confused as to how to apply it …

  5. regex - How to match "any character" in regular expression? - Stack ...

    Feb 24, 2023 · You may also sometimes need to match newlines in Java regexes in contexts where you cannot pass Pattern.DOTALL, such as when doing a multi-line regex search in Eclipse, or as a user …

  6. regex - How can I match "anything up until this sequence of characters ...

    If you're looking to capture everything up to "abc": /^(.*?)abc/ Explanation: ( ) capture the expression inside the parentheses for access using $1, $2, etc. ^ match start of line .* match anything, ? non …

  7. Regular expression to match a line that doesn't contain a word

    Jan 2, 2009 · The regex (?!hede). looks ahead to see if there's no substring "hede" to be seen, and if that is the case (so something else is seen), then the . (dot) will match any character except a line …

  8. Regex: ignore case sensitivity - Stack Overflow

    Mar 11, 2012 · How can I make the following regex ignore case sensitivity? It should match all the correct characters but ignore whether they are lower or uppercase. G[a-b].*

  9. Use dynamic (variable) string as regex pattern in JavaScript

    Here's an example: ... JSFiddle demo here. In the general case, escape the string before using as regex: Not every string is a valid regex, though: there are some speciall characters, like ( or [. To …

  10. 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 well as …