I have managed to use a Regex on Google Data Studio to create a 'last path' directory value which works great, using;
REGEXP_EXTRACT( Page , '.*/(.*)/' )
Is it possible to exclude URLs with parameters?
So for example the regex matches with;
/directory1/
/directory1/?var=1
/directory1/?var=2
So I wish to exclude any ?var= URLs but not limited to the var parameter value.
Any help is appreciated.
To solve current issue use
The anchor
$
stops from matching anything with more text after/
. If there is a query string, no match will occur.Explanation