What are regular expressions?: "What are regular expressions?
Posix regular expressions are used to match or capture portions of a field using wildcards and metacharacters. They are often used for text manipulation tasks. 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 filter is designed to exclude the hit if the regular expression in the filter matches the data contained in the field specified by the filter.
Regular expressions are text strings that contain characters, numbers, and wildcards. A list of common wildcards is contained in the table below. Note that these wildcard characters can be used literally by escaping them with a backslash '\'. For example, when entering www.google.com, escape the periods with a backslash: www\.google\.com
Wildcard Meaning
. match any single character
* match zero or more of the previous items
+ match one or more of the previous items
? match zero or one of the previous items
() remember contents of parenthesis as item
[] match one item in this list
- create a range in a list
| or
^ match to the beginning of the field
$ match to the end of"
No comments:
Post a Comment