Skip to main content
replaced http://cstheory.stackexchange.com/ with https://cstheory.stackexchange.com/
Source Link

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 tables or divs, 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.

Many text markup languages are regular or nearly regular:

troff-style markup is regular.

I think Markdown 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 tables or divs, 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.

Many text markup languages are regular or nearly regular:

troff-style markup is regular.

I think Markdown 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 tables or divs, 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.

added 11 characters in body
Source Link

Many text markup languages are regular or nearly regular:

troff-style markup is regular.

I think Markdown 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 tablestables or divs, let's allow tablesthem to be nested three or four deep. The resulting restricted HTML describes nearly 100% of allmost (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 rarelyoften not used and not really needed.

Many text markup languages are regular or nearly regular:

troff-style markup is regular.

I think Markdown 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 tables, let's allow tables to be nested three or four deep. The resulting restricted HTML describes nearly 100% of all (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 rarely used and not really needed.

Many text markup languages are regular or nearly regular:

troff-style markup is regular.

I think Markdown 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 tables or divs, 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.

Source Link

Many text markup languages are regular or nearly regular:

troff-style markup is regular.

I think Markdown 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 tables, let's allow tables to be nested three or four deep. The resulting restricted HTML describes nearly 100% of all (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 rarely used and not really needed.