Regex String Manipulator
Intro
A regular expression (shortened as regex) is a sequence of characters that specifies a search pattern. A common use for regex is to match strings or parts of strings in order to do something with the result. For example, the default expression of a+
will return all instances of the letters a found within the input string. So the string Cavalry
would output aa
because the word Ca
va
lry has two a
s.
UI
Regex - Enter a Regular Expression. The result of the expression will be returned by the String Manipulator. See Working with Regex for more information.
Capture Group Indices - Where a Regular Expression includes capture groups, determine which groups are returned. Values should be comma ,
separated for lists or colon :
separated for ranges. See Working with Regex for more information.
Examples
String | Regex | Description | Result |
---|---|---|---|
Hello World. | \s | Remove Spaces | HelloWorld. |
As Capably as Cavalry. | C.....y | 7 letter words that start with C and end with y | CapablyCavalry |
Is it Colour or Color? | Colou?r | Colour or Color | ColourColor |
3 is the magic number. | \d | Any number | 3 |