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: Deniz Dogan
Subject: Re: Regex to match "define ABC-123-xyz"
Date: Fri, 1 Oct 2010 14:18:35 +0200

2010/10/1 Gary <address@hidden>:
> 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). I can
> see this in the regexp builder, and, since I am attempting to match part
> of a programming language syntax, in source code. Kind of
> confusing. What have I done wrong, please?
>

Pardon me if I misunderstood, but it works perfectly fine for me in
re-builder. Are you saying it works for you in re-builder but not when
actually using it in code?

-- 
Deniz Dogan



reply via email to

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