Regular Expression (Regex)

A regular expression is a sequence of characters that defines a search pattern, typically used for finding or replacing specific text in strings.

For example, this is the regular expression for a number;

^\d+$ 

And this is a more complex one to match an email address;

^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$

Want to know more? Read the guide by clicking the button below.

Read full guide