Saturday, July 5, 2014

syntax highlighting with regular expressions

I'm trying to use "syntax region" with start=regex and end=regex, but having difficulty.
I want the region to match what follows the start regex and precedes the end regex.
For example, say I want to match whatever follows "foo" or "bar" and precedes "baz" or "qux".
So in these two examples, the word "test" should be highlighted:

  footestbaz
  bartestqux

Can someone show me an example that is similar to this?

--
R. Mark Volkmann
Object Computing, Inc.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: