Your Regular Expression:

Human Speak:

Errors:


Cheat Sheet:

Full documentation available here

Matching

match "hello world" matches "hello world" exactly

match "hello" then optionally " world" matches "hello" or "hello world"

match "hello" or "world" matches "hello" or "world"

match a word matches any word

Repetition

match 0+ "hello" matches 0 or more "hello"s

match 3 "hello" matches exactly "hellohellohello"

match 1 to 5 "hello" matches between 1 to 5 "hello"s

repeat 0 or more repeats the intended text 0 or more times (default)

optionally repeat between 3 to 5 optionally repeats the indented text 3 to 5 times

Grouping

create a group called mygroup creates a group called "mygroup"

create an optional group creates an unnamed optional group

Using

using global and case insensitive uses the 'g' and 'i' flags

Misc

// comment is a single line comment

/* comment */ is a multi line comment