Regular expressions
Match patterns and strings!
You can find the full description of RegExp in Wikipedia. In this article we will provide you with the short cheat sheet the frequently used expressions
You don't need JS evaluating in regex! Plus, you may should type
*
after the expressionMeta-character | Description |
. | Matches any character |
+ | Matches the preceding pattern element one or more times. |
? | Matches the preceding pattern element zero or one time. |
| | Separates alternate possibilities, A|B = A or B |
^ | Matches the beginning of a line or string. |
$ | Matches the end of a line or string. |
[ ] | Denotes a set of possible character matches. [ABC] = A or B or C |
\ | Escapes special characters |
Case | regExp (you can copy-paste them right into Directual) |
Check email format | [email protected]+\..* |
Check particular email domain | [email protected]\.com* |
Any digit number | [0-9]* |
Any latin character | [a-zA-Z]* |
Greetings | .*hello|hi|good morning|good evening|salut.* |
URL | https?:\/\/(www.)?[[email protected]:%. +~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:% +.~#?&//=]*) |