Reputation: 21212
I need to filter data in Google Analytics based on a regular expression.
I need to say "If the string contains "/secure//secure/common/callback" AND, further down the string contains the words "true" then include it.
I tried this: ^/secure//secure/common/callback*true
I added to start to say there is a bunch of text in between "callback" and "true" but it returns zero when it should return thousands of records.
What regular expression would I use here?
Upvotes: 1
Views: 257
Reputation: 91385
Use this:
^/secure//secure/common/callback.*?true
.
means any character
.*
means any character repeated O or more times
.*?
has same meaning except that it is not greedy, it matches the less amount of characters as possible, usefull if you have more than one matching (true
in this case) in your string.
Upvotes: 3