i can't say i'm too fond of this, but i thought of bringing this up. most scripting<br>languages (perl, ruby, and boo, to name some) have regular expressions as<br>language literals. since such languages are heavily used for string 
<br>manipulation, it might seem like a good idea to add them at the syntax level:<br><br>e&quot;[A-Za-z_][A-Za-z_0-9]*&quot;<br><br>i thought of prefixing &quot;e&quot; for &quot;regular *e*xpression&quot;. could also be &quot;p&quot; for pattern.
<br>it's very simple -- regex literal strings are just passed to re.compile(), upon <br>creation, i.e.:<br>a = e&quot;[A-Z]&quot;<br><br>is the same as<br>a = re.compile(&quot;[A-Z]&quot;)<br><br>what is it good for?<br><br>
if e&quot;[A-Z]&quot;.match(&quot;Q&quot;):<br>&nbsp;&nbsp;&nbsp; print &quot;success&quot;<br><br>since strings (as well as regex strings) are immutable, the compiler can <br>re.compile them at compile time, as an optimization. <br><br>
again, i can't say i'like regex literals, and i don't think it would be a <br>productivity boost (although you would no longer need to import re and<br>re.compile() your patterns)... but i wanted to bring it to your consideration.
<br><br><br>-tomer