I need to match a URL in google analytics for use in a goal and a funnel.
I would like to match a url for http://url.com/guides/anything-that-comes-after
I will be matching /guides on it's own goal, but would like to match /guides/* (how I would do it with a simple wildcard) with the regex.
End of String or Line: $ The $ anchor specifies that the preceding pattern must occur at the end of the input string, or before \n at the end of the input string. If you use $ with the RegexOptions. Multiline option, the match can also occur at the end of a line.
Basically (0+1)* mathes any sequence of ones and zeroes. So, in your example (0+1)*1(0+1)* should match any sequence that has 1. It would not match 000 , but it would match 010 , 1 , 111 etc. (0+1) means 0 OR 1.
[] denotes a character class. () denotes a capturing group. [a-z0-9] -- One character that is in the range of a-z OR 0-9.
So you're trying to match anything that comes after "guides/", basically?
^http\:\/\/url\.com\/guides\/(.+)$
should match anything after your based URL. If you want to make it domain independent, try this:
^http\:\/\/.+?\/guides\/(.+)$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With