Re: smiley regexp problem

2005-03-21 Thread Rajsekar
Stefan Monnier <[EMAIL PROTECTED]> writes: >> The point is about \\W. \\W matches any character that is not a >> word-constituent. I want `:-)' to become a smile if it is followed by any >> of `\\W' but not ')'. If I put it as "\\(:-?)\\)[^)]", then even strings >> like "smile_within:-)strings"

Re: smiley regexp problem

2005-03-21 Thread Stefan Monnier
> The point is about \\W. \\W matches any character that is not a > word-constituent. I want `:-)' to become a smile if it is followed by any > of `\\W' but not ')'. If I put it as "\\(:-?)\\)[^)]", then even strings > like "smile_within:-)strings" also get smileys. So I am looking for a way >

Re: smiley regexp problem

2005-03-21 Thread Lennart Borgman
- Original Message - From: "Rajsekar" <[EMAIL PROTECTED]> > The point is about \\W. \\W matches any character that is not a > word-constituent. I want `:-)' to become a smile if it is followed by any > of `\\W' but not ')'. If I put it as "\\(:-?)\\)[^)]", then even strings > like "smi

Re: smiley regexp problem

2005-03-21 Thread Rajsekar
LENNART BORGMAN <[EMAIL PROTECTED]> writes: > > Maybe you could add a complemented character set to the first one after the > smile (with whatever slashes there are needed to get this to work): [^)] The point is about \\W. \\W matches any character that is not a word-constituent. I want `:-)

Re: smiley regexp problem

2005-03-21 Thread LENNART BORGMAN
> >>> I want to setup the smileys similar to gaim. > >>> So I put > >>> > >>> "\\(:)\\)\\W" for smile. > >>> and > >>> "\\(:))\\)\\W" for laugh. > >>> > >>> The problem is that :)) also contains a :). At the same time, ... > > Why don't you match "laugh" first, and only look for

Re: smiley regexp problem

2005-03-21 Thread Rajsekar
David Kastrup <[EMAIL PROTECTED]> writes: > Rajsekar <[EMAIL PROTECTED]> writes: > >> Rajsekar <[EMAIL PROTECTED]> writes: >> >>> I want to setup the smileys similar to gaim. >>> So I put >>> >>> "\\(:)\\)\\W" for smile. >>> and >>> "\\(:))\\)\\W" for laugh. >>> >>> The problem is

Re: smiley regexp problem

2005-03-20 Thread David Kastrup
Rajsekar <[EMAIL PROTECTED]> writes: > Rajsekar <[EMAIL PROTECTED]> writes: > >> I want to setup the smileys similar to gaim. >> So I put >> >> "\\(:)\\)\\W" for smile. >> and >> "\\(:))\\)\\W" for laugh. >> >> The problem is that :)) also contains a :). At the same time, i do no

Re: smiley regexp problem

2005-03-20 Thread Rajsekar
Rajsekar <[EMAIL PROTECTED]> writes: > I want to setup the smileys similar to gaim. > So I put > > "\\(:)\\)\\W" for smile. > and > "\\(:))\\)\\W" for laugh. > > The problem is that :)) also contains a :). At the same time, i do not > want to replace \W with something like [^)] b

smiley regexp problem

2005-03-17 Thread Rajsekar
I want to setup the smileys similar to gaim. So I put "\\(:)\\)\\W" for smile. and "\\(:))\\)\\W" for laugh. The problem is that :)) also contains a :). At the same time, i do not want to replace \W with something like [^)] because i lose the advantage of \W (which works based