I recently learned of the option to make a custom syntax highlighting system for texworks as laid out in the texworks manual If you go to the *\customizing texworks\syntax highlighting*section of the manual it tells you to edit the syntax-patterns.txt file.
Anyway what I'm trying to do is to highlight any of the latex lengths\measurements such as cm, mm, in, em in pink.
I 1st tried pink N (pt|mm|cm|in|ex|em)
but the problem with that is that words such as "*in*terview" or "*em*power" will have these letters go pink too.
The actual lengths will only appear after a digit so I need to stipulate some kind of condition for it to do that.
My own research on the matter has lead me down the path of the lookbehind feature for regular expressions which you can read about here The best I've been able to come up with is
pink N (?<=\d)pt|mm|cm|in|ex|em
but this doesn't work. Any help is appreciated.