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

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

regular expression help (again)


From: Luca Ferrari
Subject: regular expression help (again)
Date: Thu, 24 Jan 2013 08:22:30 +0100

Hi,
there is something I'm missing: I'm still writing my mode for a
programming language and I'd like to set a font-lock for a block of
lines that begins with /SOMETHING and ends with /* like the following:

/MASK
Field 1: _____
Field 2: _____
/*

So I defined the following regular expression to first match the whole block:

"^/\w+[ \t\n]+(.*\n)/\*$"

but it is not working, in particular testing it against
re-search-forward the \w+ works as expected but the [ \t\n]+
subsedquent part is blocking the regular expression. What am I doing
wrong?

Second question, within the same block would it be possible to set a
fot-lock for any word that is not made by underscores and to set
another font-lock for any _ found in the block? I need a little
suggestion about this (if possible).

Thanks,
Luca



reply via email to

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