Regex highlighting in Markdown code blocks

I have a Markdown file explaining some regexes. I’ve tried using different languages (Python, Perl, JS to name a few) to see if the regexes would look nicer and hence easier to understand, but none have done a lot to help this.

Is there a language, or any other way, to syntax highlight regexes on code blocks?

Try regex. All languages supported in markdown previews on GitHub can be found in GitHub Linguist, in this file:

whether they’re all syntax highlighted it’s not something I’m 100% sure about (usually they are), since the languages/syntaxes data here is also used for repo statistics.

Thanks! I tried it, but highlighting only happened on vs code, I think i’m gonna leave it as it is anyways.