Regular Expressions Resource Page

External Resources

Regular Expressions For Google Analytics (by Luna Metrics)

Download Now

RegEx guide for GA and GTM (by Aleksandrs Pasters)

Read now
RegExOne – Free interactive Course

Start Learning

Regex Key-Characters

Asterisk

The Asterisk (*) matches zero or more the item before it.

Dash

Dashes (-) help create advanced list of items and work great with square brackets []

Pipe

The Pipe (|) is the same as “or” and can be used to match two items.

Backslash

The Backslash () turns special Regular Expressions into normal characters.

Dollar Sign

The Dollar Sign ($) means “end width”

Plus Sign

The Plus Sign (+) matches one or more of the characters previous to it

Caret

The Caret (^) is the opposite of the Dollar Sign ($) and means something begins with.

Dot (.)

The Dot (.) is like a wildcard and will match any character.

Dot-Asterisk (.*)

The Dot-Asterisk combo (.*) is a powerful combination that can match zero or more random characthers – so everything.

Question mark(?)

The Question mark (?) will mean the last character is optional

Curly brackets

The Curly Brackets ({}) allows you to repeat the last item by the stated number.

Parentheses

Parentheses () work in the same way as standard mathematics – by grouping items together before the calculation.