Top "Regex" questions

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

How to output only captured groups with sed?

Is there any way to tell sed to output only captured groups? For example given the input: This is a …

regex sed
Regular expression to match a word or its prefix

I want to match a regular expression on a whole word. In the following example I am trying to match …

regex expression word
RegEx for Javascript to allow only alphanumeric

I need to find a reg ex that only allows alphanumeric. So far, everyone I try only works if the …

javascript regex
python .replace() regex

I am trying to do a grab everything after the "</html>" tag and delete it, but my code …

python regex
Regular Expression to match string starting with "stop"

How do I create a regular expression to match a word at the beginning of a string. We are looking …

regex
Regular expression to get a string between two strings in Javascript

I have found very similar posts, but I can't quite get my regular expression right here. I am trying to …

javascript regex string
Is there a simple way to remove multiple spaces in a string?

Suppose this string: The fox jumped over the log. Turning into: The fox jumped over the log. What is the …

python regex string
Regular Expression to match only alphabetic characters

I was wondering If I could get a regular expression which will match a string that only has alphabetic characters, …

regex
I want to remove double quotes from a String

I want to remove the "" around a String. e.g. if the String is: "I am here" then I want …

javascript regex
Whitespace Matching Regex - Java

The Java API for regular expressions states that \s will match whitespace. So the regex \\s\\s should match two …

java regex whitespace