help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regex to match "define ABC-123-xyz"


From: Marc Mientki
Subject: Re: Regex to match "define ABC-123-xyz"
Date: Wed, 08 Dec 2010 15:30:32 -0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4

Am 01.10.2010 14:10, schrieb Gary:
I'm having trouble with this, to say the least. "Obviously" the parts
after the define aren't fixed, either in content or position. What I
have tried is

define [A-Za-z0-9_-]+

(that is, match the string "define", followed by a single space,
followed by some string consisting of letters and numbers plus "_" and
"-") which works except... it doesn't match the numeric part(s).

Here (GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600) of 2010-05-08 on G41R2F1) everything works as expected:
M-C-s define [A-Za-z0-9_-]+
matches entire "define ABC-123-xyz".

regards
Marc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]