on cannot be used. You can see the difference
by comparing the behaviour of
<pre>
  (a+)*\d
</pre>
with the pattern above. The former gives a failure almost instantly when
applied to a whole line of "a" characters, whereas the latter takes an
appreciable time with strings longer than about 20 characters.
</P>
<P>
In many cases, the solution to this kind of performance issue is to use an
atomic group or a possessive quantifier. This can often reduce memory
requirements as well. As another example, consider t