Top "Regex" questions

Regular expressions provide a declarative language to match patterns within strings.

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

I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). …

regex regex-negation
How to validate an email address in JavaScript

Is there a regular expression to validate an email address in JavaScript?

javascript regex validation email email-validation
RegEx match open tags except XHTML self-contained tags

I need to match all of these opening tags: <p> <a href="foo"> But not these: &…

html regex xhtml
Regular expression to check if password is "8 characters including 1 uppercase letter, 1 special character, alphanumeric characters"

I want a regular expression to check that a password must be eight characters including one uppercase letter, one special …

c# regex
How to 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 …

regex validation email email-validation string-parsing
Regular Expression for alphanumeric and underscores

I would like to have a regular expression that checks if a string contains only upper and lowercase letters, numbers, …

How to extract numbers from a string in Python?

I would extract all the numbers contained in a string. Which is the better suited for the purpose, regular expressions …

python regex string numbers
How to validate phone numbers using regex

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it …

regex validation phone-number
How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops

How can I use regular expressions in Excel and take advantage of Excel's powerful grid-like setup for data manipulation? In-cell …

regex excel vba
Negative matching using grep (match lines that do not contain foo)

I have been trying to work out the syntax for this command: grep ! error_log | find /home/foo/public_html/ …

regex grep