Top "Regex" questions

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

Selecting data frame rows based on partial string match in a column

I want to select rows from a data frame based on partial match of a string in a column, e.…

r regex string match subset
Regex to Match Symbols: !$%^&*()_+|~-=`{}[]:";'<>?,./

I'm trying to create a Regex test in JavaScript that will test a string to contain any of these characters: !$%^&…

javascript jquery regex
Converting user input string to regular expression

I am designing a regular expression tester in HTML and JavaScript. The user will enter a regex, a string, and …

javascript html regex
How to replace all strings to numbers contained in each string in Notepad++?

I'm trying to find all values with following pattern : value="4" value="403" value="200" value="201" value="116" value="15" and replace it with value …

regex notepad++
How to remove all whitespace from a string?

So " xx yy 11 22 33 " will become "xxyy112233". How can I achieve this?

r regex string r-faq
How to find patterns across multiple lines using grep?

I want to find files that have "abc" AND "efg" in that order, and those two strings are on different …

regex grep
Regex match entire words only

I have a regex expression that I'm using to find all the words in a given block of content, case …

regex word-boundary
How can I find all matches to a regular expression in Python?

In a program I'm writing I have Python use the re.search() function to find matches in a block of …

python regex search
Switch statement for string matching in JavaScript

How do I write a swtich for the following conditional? If the url contains "foo", then settings.base_url is "…

javascript regex switch-statement
Java regex email

First of all, I know that using regex for email is not recommended but I gotta test this out. I …

java regex email