In Preferences - Fonts and Colors, in tab Language Specific in PHP language I can see “regex” element type. But I don’t find any way to type a regex in PHP (only as string). I want to see a highlighted regex, but how I must write the regex that Komodo can understand that is regex?
Nobody knows?
Until you get a proper answer… Given that:
- Unlike JavaScript, PHP does not have a literal regex format (and I don’t think there’re plans to add it). Regular expressions can only be strings.
- Komodo doesn’t feature language injection in strings. It supports variable interpolation but that’s all so far.
- Rx Toolkit (IDE only) does not seem to use those colours.
… my guess is that it simply slipped through the GUI (given that Komodo supports like a million languages that’s easy to happen) but it isn’t really used for anything.
1 Like
So I don’t understand, why in PHP language I can see “regex” element type (Preferences -> Fonts & Colors), if it’s not used…
Like alvaro said, it probably slipped through, I’m not aware of Komodo coloring regex differently in PHP, mostly because PHP just passes regex as strings and so its difficult to interpret.
It’s because it’s a UDL based lexer - and all UDL based lexers (e.g. PHP, JavaScript, HTML, Django, …) get the same Element types… even if they don’t actually use them.
1 Like
Well, it’s the answer that I wait. Thanks!