Optimize
2.5K members online now
2.5K members online now
Discover how to select who is eligible to be in your experiment, and when they’re served experiment variations.
Guide Me
star_border
Reply

How to use the symbol # in matches regex

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm using this regular expression ^http?:\/\/(www\.)?whoopassenterprises\.com\/bobbleheads-shop((.*)\/){3,4}  

But I also need this page http://www.whoopassenterprises.com/#free-mockup

I'm trying to write something like this ^http?:\/\/(www\.)?whoopassenterprises\.com\/.*free-mockup - but it does not work http://joxi.ru/krDRowXc0MnRq2

If I try to use any other character except # - everything works well 

 

If someone has any idea - please let me know.

 

How to use the symbol # in matches regex

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆

Hi @Bogdan Mateescu,

 

You need to use escape character '\' with the special character '#'

Try using it '\#' without the quotes.

Like this: ^http?:\/\/(www\.)?whoopassenterprises\.com\/\#free-mockup 

 

 

Hope this helps. Smiley Happy

 

Regards,

Vaibhav