The /g flag does not require that further matching must start past the end of the previous match--it just makes a request for any other unique matches.
No. It makes a request for another match to the leftright of the end of the previous match. The first match goes up to position 12:
So the next match sees only <c>ddTGA</cc> to match against.aaaBBBcccTGAddTGA XXXXXXXXX TGA ^ match ends here
In reply to Re^3: \G and regexes
by moritz
in thread \G and regexes
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |