I’m trying to set up a Google Analytics goal url regular expression to match:
Any number of any characters followed by “first-login?” followed by any number of any characters.
Examples:
- /user/452/first-login?uid=452
- /bob-smith/first-login?fish=tuna
Seems simple, but I’m a total noob at regex. Thanks for the help!
You can use a simple
indexOfto search for thefirst-login?substring in the URL.If that is not possible, the Perl compatible regex below will match a URL that contains
first-login?as substring. You may need to add separator character or string escape depending on the language you are using.(Note: answer edited to match the question)