Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Actually, the greedy character class would match "cde", since a will match a, b will match b and the last [a-z] will match f. The reluctant character group will match exactly the same thing Commented Jul 16, 2009 at 17:56
  • 1
    @Machine: you are wrong, [a-z]*?[a-z] would always match the first [a-z] character! 1. [a-z]*? first jumps to the next rule: [a-z], if that doesn't match then [a-z]*? would not match either, and that's the end of the story. But 2. if [a-z] matches, everybody is happy... Commented Jul 1, 2010 at 12:44