On 09/30/2010 04:44 PM, Satyaanveshi wrote:
Bugzilla from [email protected] wrote:Hi there, i execute this command in bash (cygwin): echo CC-3623843-4/2008 | grep -P -o --regexp=-.*?/ and I get this result: -3623843-4/ Shouldn it be -4/
Non-greediness doesn't override the "leftmost" rule. The match is always attempted from the beginning of the string, in your case from the first dash.
Paolo
