Cheatsheet: Regex

Literal Character:

a

Any Character:

.

Character Set:

[abc]

Negated Character Set:

[^abc]

Range:

[a-z]

Zero or More:

a*

One or More:

a+

Zero or One:

a?

Start of Line:

^

End of Line:

$

Group:

(a)

Alternation:

a|b

Escape Special Character:

\.

Group:

\s(.*?)\s

Named Group:

(?<ip>.*?)\s

multiple named and unnamed groups:

^(?<ip>.*?)\s(.*?)\s(.*?)\s\[(.*?)\s