I am trying to match some emoticon symbols using javascript regex.
The regex doesn’t seem to be working for expressions having > or <
For example, to match <3 I used /<3/ but it wouldn’t work. It didn’t work for >.< either. I tried escaping the </> symbols, but to no avail.
All other symbols are working correctly. For instance ^_^ with /\^\_\^/ and \m/ with /\\m\//
What am I possibly missing here?
They might be HTML encoded
>and<as>and<.Try
/(<|<)3/and/(>|>)\.(<|<)/.