Regular expressions are special characters that match or capture portions of a field, as well as the rules that govern all characters. Most of the filters included in Google Analytics use these expressions to match the data and perform an action when a match is achieved.
For instance, an “exclude by IP address” filter will exclude the hit if the regular expression that you write matches the visitor’s IP address. Your regular expression in the Exclude by IP Address field might look like this:
So when someone at IP address 18.104.22.168 visits your site, a match happens between 163\.212\.171\.123 and 22.214.171.124, and the hit is excluded. The backslashes in the expression above are only one example of the special characters that regular expressions use.
Regular Expression Characters
Click on each character’s description to read a detailed article describing how to use it.