regexp exclusion

Posted by Vlad on Stack Overflow See other posts from Stack Overflow or by Vlad
Published on 2010-03-20T12:06:15Z Indexed on 2010/03/20 12:11 UTC
Read the original article Hit count: 321

Filed under:
|

Hello everyone! I have regexp to change smileys to images. Here it is

(?:(?![0]:\)|:\)\)|:-\)\)))(:\)|:-\))

The point is not to change 0:) and :)) and :-)) while changing :) and :-) It works pretty well with :)) and :-)) but somehow still grabs :) in 0:)

Where's my mistake?

© Stack Overflow or respective owner

Related posts about regex

Related posts about exception