Designing a Good DSL
Claiming that regular expressions are too terse is a bit much. There are only three (!) fundamental operators in basic regular expressions (four if you include parenthesis), with all other non-language specific operators being derived from that (ignoring precendence rules):<p>1. concatenation, to append regex A or regex B: AB<p>2. alternation, to select between A or B: A | B<p>3. kleene star, to repeat A zero or more times: A*<p>4. parenthesis allows specification of a sub-expression: (A)<p>The following are all derived&#x2F;syntactic sugar:<p>[ABCD] -&gt; (A | B | C | D)<p>A+ -&gt; AA*<p>A{2} -&gt; AA<p>A{2,4} -&gt; AA(|A|AA) or A(A|AA|AAA)<p>A? -&gt; (A|)<p>Just about everything else is implementation specific (if choice of special characters and available operators isn&#x27;t already). That means you either need to be using the features regularly to remember them, or you have to look them up anyway.<p>Regular expressions are terse not because they are badly designed, but because by definition the description of regular languages is inherently minimal. It is part of their beauty. Without this minimalism, every tidy little one liner we have to perform some simple match becomes a multi-line specification in Backus-Naur form.<p>The world needs to get over this fear of regular expressions from ignorance and continued misinformation. They are not magic or impossible to understand. They are an elegant description of a very simple state machine which steps through a string one character at a time, nothing more.<p>Edit: corrected derivation of A{2,4} a la Twisol and 	
jbnicolai.