I'm trying to use the following regex to match 'Capitalized' words:
"\l\@<!\<\u\w\+"
Which matches 'Main' and 'Canvas' in:
public class Main extends Canvas
Or another example, matches all occurrences of 'Bitmap':
public Bitmap b = new Bitmap();
And InputHandler in:
addKeyListener(new InputHandler())
This works fairly nice when used in search mode but not completely when using syntax match
in a syntax file, where the command would be:
syntax match Capitalized "\l\@<!\<\u\w\+"
This does not match anything that is inside parenthesis. Take one example from above:
addKeyListener(new InputHandler())
InputHandler is matched in search mode, but not from a syntax match command.
Am I missing something?
contains
andcontained
, in that the parantheses are matched by a syntax region command, and everything that can be matched inside the parantheses must be defined with properly definedcontainedin=...
.