Hi,
This is a golang regex question specific to looker studio.
I have some regex that I believe I used some years ago in datastudio/gtm that searched for duplicate word, separated by a colon, to match a top level navigation hierarchy click. Which is useful when separating out a lists top level click vs. its constituents in a websites navigation from generated events.
This is the regex that worked in python flavour of regex
((\w+)\s(\w+))\s:\s\1
Can match
Your Navigation : Your Navigation
Your Navigation1 : Your Navigation1
but not
Your Navigation : This is a submenu item inside navigation
However \1 token provides an error in golang in regex101
\1 this token has no special meaning and has thus been rendered erroneous.
even though Regex101 seems to contradict this in its documentation stating \1 is a token.
Any advise on amending the regex to work or tips on this would be appreciated.
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 |