On Mon, Jul 7, 2014 at 7:30 AM, <rxjw...@gmail.com> wrote: > Because I am new to Python, I may not describe the question clearly. Could you > read the original problem on web: > > https://docs.python.org/2/howto/regex.html > > It says that it gets 'abcb'. Could you explain it to me? Thanks again
The string being matched in the explanation at that link is 'abcbd', not 'abcdb'. The 'a' in the pattern matches the 'a' in the string, the '[bcd]*' in the pattern matches the 'bc' in the string (with a repeat count of 2), and finally the 'b' in the pattern matches the 'b' following that in the string. -- https://mail.python.org/mailman/listinfo/python-list