Search
Clear search
Close search
Google apps
Main menu

Backslash (\) and dot (.)

Created by: LunaMetrics on February 20, 2008
Last updated on July 21, 2016

This article is part of a series of articles on regular expressions. Many filter and condition fields in Analytics provide an option for you to use a regular expression. If you are new to regular expressions and want to use them in Google Analytics, read About regular expressions.

Backslash

Use a backslash to turn any special character into a literal character (i.e. “escape,” a character). (The backslash key is usually located directly above the ”Enter" or "Return" key.)

Although the backslash can be used with any special character, it is most often used with a dot. This is because a dot is both a special character and one that is used as part of URLs (Example: www.myspace.com — the dot appears twice.) In the case of URLs, you'll need to use a backslash as follows: mysite\.com. Here is an example of how an IP address would need to be typed: 64\.68\.82\.164

Dot

The dot is used to match any one character. For example,

.ate

will match late, date, sate, or any four-character expression. It will also match 8ate (the character doesn't have to be a letter.) However, it won't match ate, because one character must substitute for the dot.

Why the backslash and dot are so often used together

In this expression:

homepage.com

The dot is a wild card that stands for any one character. This expression will match homepagescom and homepage4com and homepagedcom. If you really want to match homepage.com, you'll need to use a backslash like this: homepage\.com.

Was this article helpful?
How can we improve it?
Google Analytics training and support resources

Check out our comprehensive list to learn more about Analytics solutions.