google analytics - Regex for value less than X -
i have website uses google analytics collect event values (annual salaries). want see average event value, skewed people entering exceptionally large values.
i want regex filter out values above 5 million (5000000).
or, if it’s easier, happy regex accepts values of 7 characters, value 9999999.
i have no idea how write regex google analytics , couldn’t find similar examples.
cheers.
i not used google analytics, if want limit match amount of characters, use right quantifier , anchors, e.g.
\b\d{1,7}\b
to match numbers 1 7 digits.
\b
matching word boundary, means there not word character before or following.
\d
matching digit
{1,7}
quantifier matching 1 7 repetitions
regexes matching patterns, means don't know semantic of matched characters. so, matching value of number not easy regex , should avoided.
Comments
Post a Comment