It is greedy, but it can't match hyphens because they're included in the negative character class.1. How is it that '/[^\d-]*(-)[^\d-]*/' is not greedy?For which pattern?2. In the following 3-,-,,-,,,-,,,,-,,,,,-4,5 what is the last match? I guess I am still trying to wrap my mind around the 0 or more quantifier.



Reply With Quote

Bookmarks