On Thu, May 11, 2006 at 10:12:32AM -0400, Benji Fisher wrote:
> On Wed, May 10, 2006 at 02:53:20PM -0600, Shaun Cummins wrote:
> > I would like to use a variable within a regular expression counter. I
> > tried the following, but it gave me a syntax error:
> >
> > :syntax region Keyword start="^\w\+\s\+\z(\d\+\)"
> > end=#\(\s*\(".\+"\|'.\+'\).*\n\)\{\z1\}#
[snip]
> I do not think I can answer this, and there may not be a way to do
> what you want, but I want to clarify the question. Is your intention to
> match the "STALIST 6" with the start pattern and, since it ends in " 6",
> match the next 6 lines with the end pattern?
If that's the case I suspect the only way to do it is to set up
a separate syntax entry for each possible number, so it would be
syntax region Keyword start="^\w\+\s\+1\>" end={pattern for one line}
syntax region Keyword start="^\w\+\s\+2\>" end={pattern for two lines}
and so on. Perhaps "syntax match" would be better, depending on the
precise requirements. It's bad news if the number can go as high as
2000 but I can't think of an easier way to do it.
--
Matthew Winn ([EMAIL PROTECTED])