all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* regular expression help (again)
@ 2013-01-24  7:22 Luca Ferrari
  2013-01-24  9:23 ` Luca Ferrari
  2013-01-28 14:33 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Luca Ferrari @ 2013-01-24  7:22 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <mailman.18180.1359012159.855.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2013-01-28 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24  7:22 regular expression help (again) Luca Ferrari
2013-01-24  9:23 ` Luca Ferrari
2013-01-28 14:33 ` Stefan Monnier
     [not found] <mailman.18180.1359012159.855.help-gnu-emacs@gnu.org>
2013-01-24  9:01 ` Barry Margolin

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.