- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
02-19-2014 04:05 AM
Solved! Go to Solution.
02-19-2014 04:12 AM
02-19-2014 06:17 AM
09-23-2015 11:27 AM
08-24-2018 04:26 AM - edited 08-24-2018 04:27 AM
I am reviving a very old thread but since its related to regex, I chose to mention here-
Has anybody faced utag.js errors on firefox and safari browsers due to negative lookbacks in regex. It caused an issue on one of my publishes as Chrome works perfectly fine.
I am trying to write a regex within a load rule to make sure the URL follows below pattern-
subdomain.abc.com (should match)
www.abc.com (should return false).
Hence I built a regex using regex101 as-
[a-z]+(?<!www)\.abc\.com
This works fine for chrome but fails to compile on firefox and safari due to negative look back (?<).
Can anybody help me with this
08-28-2018 11:23 AM - last edited on 08-28-2018 11:25 AM by kathleen_jo
Hi @ksugam,
Is it possible to use something like [a-z]+([^www])\.abc\.com to meet your needs?
Tested in FF:
var a = /[a-z]+([^www])\.abc\.com/;
a.match("www.abc.com") //false
a.match("somedomain.abc.com")//true
*Chrome is the only browser that supports lookbehinds from ECMA2018 from what I read.
08-29-2018 01:32 AM
Copyright All Rights Reserved © 2008-2023