apologies for the rookie question.
I have a small journal where I am letting users comment on stuff that I post and am converting certain characters to smileys.
so :) becomes an image <img src='\smiley\smile.png' />
and :d becomes <img src='\smiley\big-smile.png' />
and so on and so forth.
Now, recently, one of my friends posted an educational link which had a :d
in the url and my smiley regex jumped at the link and broke it into pieces, with a big smile image.
You get the Idea.
So I changed my regex from :d
to \b:d\b
and expected it to match whole word, if :d
is all by itself. Guess what? the regex picks up NOTHING now.
here is a sample demonstration of what I am talking about
How do I get the regex to match only :d
on its own? thanks.