The colouring is in the markdown formatting of the forum. Enclose a string in back-ticks to render it in basic ‘code’ form - i.e. monospaced font, background colour, no auto-substitution of ‘smart features’
To get colouring of code, put thee backticks on a separate line before and after the code string. The forum supports per-language colouring, but there is none written for Tinderbox though the default with no language works well, not least in picking out quoted strings.
BBEdit? Me too, great app! But I also don’t get any special mark-up - pasted in action code defaults to ‘plain text’ (txt). I guess if you burrow into Discourse forum software docs (are there any?) it might explain the logic for its default colouring. I think the general concept is copied across from the stackOverflow model from which Discourse is derived.
FWIW, I think a Tinderbox-specific colouring ‘library’ would be hard. The app is c.18 years old and started with a simple action code where meaning was derived from parsing, i.e. no need for quoted strings, expression endings, etc. Whilst current complexity means newer additions to action code are more formalised, most legacy (original) forms of code are supported. The most detailed reference is likely my aTbRef but even in there you’ll see grey areas and inconsistencies - from a programmer’s perspective (…I think, as I’m not one).
FWIW, in terms of regex, if you use a regex tester or reference that follows Perl rules you’re pretty much in the right place. Internally, Tinderbox uses the Boost Regex library whose documentation is here.
For a skilled programmer, the TBX file is 'just’XML (see here for the element structure - or my take on it from black-box deconstruction). So, you could do substitutions—with care, on a backup—directly in the XML. I’d only caution against being too creative with note $text. Links (in the link table in XML) work of offsets in the plain text version of $Text whilst the RTFD copy of text holds a richer copy of the text (images, RTF links, etc.).