Many questions about regex include code blocks with language agnostic, POSIX compatible patterns, using default prettifying. (Example)
This looks kind of ugly and is confusing, since some parts are marked as literals.
How should regex code be handled? Should syntax highlighting just be disabled for regex using lang-none? I think correct syntax highlighting could improve its readability, just by marking metacharacters and escaped metacharacters.
Including a language tag results in a different highlighting and seems superfluous when talking about POSIX regex—maybe even obstructive, since most people don't want to read questions about your esoteric-language. Including a language tag and using a full line of code, like String pattern = "[a-z0-9]+";
wouldn't add any valuable information. It would only get rid of the random highlights by showing the whole pattern as literal, so no advantage over disabling highlighting completely. Of course including a language tag has its advantage though and a new feature should wait, IMHO, until it is clear that a question's language tag hasn't just been forgotten.