It seems that โtwo-level regular expressionsโ are a (slightly ambiguous) term for what I recommended in a few answers here in StackOverflow for analyzing a slightly complex (but still regular) language problem.
An example is getting all urls img src= from an HTML page. It is possible (but rather dirty) to do this all in one regex; which makes sense to use a regular expression to get all the <img> tags (capturing the entire tag), and then use another regular expression to get src="http://some-url-here.com" from each match. This makes the code more readable and you only look at the text twice.
source share