I'm trying to write some syntax highlighting for PBwiki, and I'd like to
reuse some complex regexps. Here are some concrete examples:
http://pbwiki.com -and- [http://pbwiki.com/|PBwiki]
[EMAIL PROTECTED] -and- [EMAIL PROTECTED]|help me harder!!]
I have the following redundant expressions:
syntax match pbwikiLink
`\(https\?\|ftp\|mailto\|file\):\(\(\(//\)\|\(\\\\\)\)*[A-Za-z0-9:[EMAIL
PROTECTED]/;$~_?+-=.&\-\\\\]*\)`
syntax match pbwikiLink
`\[\(https\?\|ftp\|mailto\|file\):\(\(\(//\)\|\(\\\\\)\)*[A-Za-z0-9:[EMAIL
PROTECTED]/;$~_?+-=.&\-\\\\]*\)|[^]].\{-}\]`
syntax match pbwikiLink
[EMAIL PROTECTED],4}`
syntax match pbwikiLink
[EMAIL PROTECTED],4}|[^]].\{-}\]`
How do I reuse the URL regexp and the email regexp inside the
[<url>|<friendly text>]?
--
/George V. Reilly
http://www.georgevreilly.com/blog
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---