Hi,
While performing extraction of data from Google Analytics(GA) we went through following information.
This link has reference and talks about using escape characters/count of characters while writing filer/segment expressions as give below.
Filter Expressions
There are a couple of important rules for filter expressions:
- URL-reserved characters — Characters such as
& must be url-encoded in the usual way.
- Reserved characters — The semicolon, comma, and backslash must all be backslash escaped when they appear in an expression.
- semicolon
\;
- comma
\,
- backslash
\\
- Regular Expressions — You can also use regular expressions in filter expressions
using the
=~ and !~ operators. Their syntax is similar to Perl regular expressions
and have these additional rules:
- Maximum length of 128 characters — Regular expressions
longer than 128 characters result in a
400 Bad Request status
code returned from the server.
- Case sensitivity — Regular expression matching is case-insensitive.
Based on the above facts we tested for the segment which has ',' and ';' in the expression for segment and it still worked.
Similarly we tested the regular expression for segment with more than 128 characters. That also happened to work fine.
If both these facts are considered then above two tests should have failed. Which is not the case.
Can anybody please explain what is the significance of escape characters and number of characters if both these are not working as per the statements?
Regards,
Prathamesh