Sublime Forum

Help with some Regular Expressions for Syntax Highlighting

#1

Greetings,

So iā€™m working on a syntax highlighting for some lua.

How can i specify something like so:

([A-Za-z0-9_]+) - This being one color.
([A-Za-z0-9_]+) - This being another color. But if i put Quotation marks around this it will change to another color.

so the final match would look somethink like this:

([A-Za-z0-9_]+)\(([A-Za-z0-9_]+)\)

now that would be simple enough just by adding captures, but if i want the second capture to change color as soon as i put Quotation marks around it, hows that possible?

0 Likes

#2

Got it all figured out myself :smile:

0 Likes