Many text markup languages are regular or nearly regular:
troff-style markup is regular.
I think MarkdownMarkdown would be regular if links were always specified inline (as is required in comments).
Wikipedia markup was regular for a while and still is for the most part.
HTML is mostly regular. The subset of HTML in which no element may be directly nested or nested within itself is regular, as far as I can see; if this limitation were imposed on today's web, we wouldn't really lose any power. For sites that work with nested table
s or div
s, let's allow them to be nested three or four deep. The resulting restricted HTML describes most (valid) web documents, and it is regular.
What makes using regular expressions for matching fragments of HTML a bad idea is HTML's pervasive reliance on matching pairs to identify subfragments (begin tag - end tag, begin comment - end comment, begin quote - end quote), but only allowing unlimited nesting depth of such pairs makes HTML nonregular, and while HTML allows that, it is often not used and not really needed.