Clear search
Close search
Google apps
Main menu

Caret (^)

Created by: LunaMetrics on February 20, 2008
Last updated by: LunaMetrics on February 20, 2008

^ If anything comes before this character, the string is not a match to this Regular Expression

For example, let's say that you have two pages on your website,, and

Ordinarily, Analytics calls these pages /secondpage/contact/ and /contact/. That's because Analytics already knows about the domain,

If you want to find all the strings that start with /contact/ (the second option) but just put in that same line, /contact/ for your regular expression, you will get everything that can possibly match the string, which will include the one you don't want, /secondpage/contact/.

If you only want to match, you can use regular expressions like this:


Two additional points:

1) Analytics already thinks in terms of relative URLs. It assumes the, so when you ask for ^/contact/, it will come back and correctly show you strings that say /contact/.

2) Anchor carets are useful in other places besides just URLs. Let's say you want to create a filter for the entire range of IP addresses in your company. However, your IP addresses all start with a two digit number, like, so you wouldn't want to filter out something that looked like this: 164.xx.xx.xx. To solve that problem, you can use a carat: ^64 etc.

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.