all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: smiley regexp problem
Date: Sun, 20 Mar 2005 22:48:40 +0100	[thread overview]
Message-ID: <x5k6o27zuv.fsf@lola.goethe.zz> (raw)
In-Reply-To: <m3r7iaqaew.fsf@rajsekar.pc> (rajsekar@cse.iitm.ernet.in's message of "Mon, 21 Mar 2005 02:53:19 +0530")

Rajsekar <rajsekar@cse.iitm.ernet.in> writes:

> Rajsekar <rajsekar@cse.iitm.ernet.in> 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 [^)] because i lose the advantage of
>> \W (which works based on the current syntax).  I want something like \\W
>> minus the character `('.  Can someone tell me how to achieve this?
>
> I see from theory that the needed language is still a regexp, yet i
> am not able to express it in the language of regexp.  Is it a
> shortcoming in the language?

Why don't you match "laugh" first, and only look for a smile if no
laugh is can be found?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2005-03-20 21:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-17 11:55 smiley regexp problem Rajsekar
2005-03-20 21:23 ` Rajsekar
2005-03-20 21:48   ` David Kastrup [this message]
2005-03-21  8:06     ` Rajsekar
  -- strict thread matches above, loose matches on Subject: below --
2005-03-21 10:47 LENNART BORGMAN
2005-03-21 12:12 ` Rajsekar
2005-03-21 13:22   ` Lennart Borgman
2005-03-21 13:49   ` Stefan Monnier
2005-03-21 19:53     ` Rajsekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5k6o27zuv.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.