Mobile app version of vmapp.org
Login or Join
Odierno851

: Regular expression for pages in Google Analytics that matches full words only I am trying to create a regular expression to see all my landing pages in one search result. This is what I have

@Odierno851

Posted in: #GoogleAnalytics #RegularExpression

I am trying to create a regular expression to see all my landing pages in one search result.

This is what I have so far, but this regular expression does not consider the (W|$)), meaning that I receive results which that word is not the end of the string (I know I would need to add the beginning and ending / to be getting any meaningful data)

((W|^)[Pp]rofessional(W|$)|(W|^)[Aa]dam(W|$)|(W|^)[Dd]unkey(W|$)|(W|^)[Aa]ny[Pp]ur(W|$)|(W|^)[Ee]nd(W|$)|(W|^)[fF]inal(W|$))


I tried to follow the Google's guide again to no avail:

(W|^)([Pp]rojects|[Aa]wards|[Dd]ownload|[Aa]bout[Pp]ages|[Ee]xperts|[fF]orum)(W|$)

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Odierno851

1 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

You have a syntax error in your final regular expression. You are missing a pipe between "about" and "pages". (Edit: this appears to be intentional as the page is named "AboutPages".)

Instead of (w|^) and (W|$) you could try b which is "word boundary". I plugged that into a regular expression tester and it seems to work well: regex101.com/r/tF1lZ4
b([Pp]rojects|[Aa]wards|[Dd]ownload|[Aa]bout[Pp]ages|[Ee]xperts|[fF]orum)b

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme