Hi, You can use: echo CC-3623843-4/2008 | grep -E -o --regexp=-[^-]+/
Thanks 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/ > > Thanks in advance for your help! > SanskritFritz > > -- View this message in context: http://old.nabble.com/Non-greedy-option-greedy--tp20484182p29846516.html Sent from the Gnu - Grep mailing list archive at Nabble.com.
