Reputation: 1937
I have a regex in Ruby to match a huge list of emoticons
/\|?>?[:*;Xx8=<(%)D]-?'?,?o?\_^?[-DOo0S*Ppb3c:;\/\\|)(}{\]><]\)?/
But it doesnt match a few emoticons like
:'-(
and
:*(
The link with my set of matching emoticons is http://rubular.com/r/1vnWEvN76v
How do I match the unmatched ones ?
Upvotes: 0
Views: 132
Reputation: 107347
use r":'-\("
for first example and r":\*\("
for second . and you can add them with pipe (|
) to your regex ! but its depend on what you want to be matched with your regex
, also you can add them after other regexes or use & or ..
Note that (
and *
are regex symbols and you need \
before them !
in this case for your regex you just need to add |\(
end of your regex:
\|?>?[:*;Xx8=<(%)D]-?'?,?o?\_^?[-DOo0S*Ppb3c:;\/\\|)(}{\]><]\)?|\(
Upvotes: 1