> For the complete documentation index, see [llms.txt](https://scenegroup.gitbook.io/cavalry/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scenegroup.gitbook.io/cavalry/nodes/utilities/string-manipulator/regex-string-manipulator.md).

# Regex String Manipulator

Use regular expressions to match strings

### 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 `Cavarly` would output `aa`  because the word &#x43;**`a`**&#x76;**`a`**&#x6C;ry has two `a`s.

### UI

**Regex** - enter your regular expression.

Examples:

| String                 | Regex     | Result         |
| ---------------------- | --------- | -------------- |
| Hello World.           | `\s`      | HelloWorld.    |
| As Capably as Cavalry. | `C.....y` | CapablyCavalry |
| Is it Colour or Color? | `Colou?r` | ColourColor    |
| 3 is the magic number. | `\d`      | 3              |

More examples can be found on [Regex101](https://regex101.com/) (bottom right of page).
