Regex for Contact has viewed at least one URL that matches regular expressionSOLVE
2 weeks ago
I'm trying to create a regex that matches:
where staffing or e-commerce can also be hosting or strategy-organization etc. (we have 8 of those in total),
but does not match:
so anything after e-commerce (or any of the other 7) shouldn't match.
I've been trying this:
which I tested with https://www.regextester.com/ and worked fine.
I can't get it to work here in Hubspot though.
Could you please help?
Thanks in advance!
Solved! Go to Solution.
2 weeks ago - last edited 2 weeks ago
You need to make the https:// and www. strings optional
The ? makes anything preceeding it optional. Please note, I did not test this in hubspot.
Edit: if you want to account for query strings and tracking codes, then you could remove the $ at the end of the regex above and add the following code to the end: (?:\?.*)?
Will you please help the community and give me some street cred by marking my answer as a solution if helped you? I'm fixing to buy a minivan and my cool points are running low.
Curious cats can find me at Ascend Inbound Marketing