It attemps to match and backtracks when it can't find a match. Here's a sample of the matches (one per line) the regexp engine attempts.
1) a*->"a"x61, a*->"", a*->"", a*->"", ... a*->"", [b]->fail
2) a*->"a"x60, a*->"a", a*->"", a*->"", ... a*->"", [b]->fail
3) a*->"a"x60, a*->"", a*->"a", a*->"", ... a*->"", [b]->fail
4) a*->"a"x60, a*->"", a*->"", a*->"a", ... a*->"", [b]->fail
.
.
.
32) a*->"a"x60, a*->"", a*->"", a*->"", ... a*->"a", [b]->fail
33) a*->"a"x60, a*->"", a*->"", a*->"", ... a*->"", [b]->fail
34) a*->"a"x59, a*->"aa", a*->"", a*->"", ... a*->"", [b]->fail
35) a*->"a"x59, a*->"a", a*->"a", a*->"", ... a*->"", [b]->fail
36) a*->"a"x59, a*->"a", a*->"", a*->"a", ... a*->"", [b]->fail
.
.
.
64) a*->"a"x59, a*->"a", a*->"", a*->"", ... a*->"a", [b]->fail
65) a*->"a"x59, a*->"a", a*->"", a*->"", ... a*->"", [b]->fail
66) a*->"a"x59, a*->"", a*->"aa", a*->"", ... a*->"", [b]->fail
67) a*->"a"x59, a*->"", a*->"a", a*->"a", ... a*->"", [b]->fail
.
.
.
95) a*->"a"x59, a*->"", a*->"a", a*->"", ... a*->"a", [b]->fail
.
.
.
The character class [b] is necessary because a plain b would trigger optimizations in the regexp engine. The optimization would cause it to scan for the location of b chars in the string to match. Finding none, it would exit immediately.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.