From: "Iñaki Baz Castillo" Date: 2008-12-15T03:50:26+09:00 Subject: Re: Help with an "easy" regular expression substitution El Domingo, 14 de Diciembre de 2008, David A. Black escribió: > The first thing that comes to mind: > >    text.sub(/(X-Level: )(\*+)/) { $1 + 'X' * $2.size } > > or, in Oniguruma, using look-behind: > >   text.sub(/(?<=X-Level: )(\*+)/) { 'X' * $1.size } Thanks, this is valid in Ruby, but I understand such a operation is not feasible with "sed" command, is it? I'm not sure yet about if I'll need to do this script in Ruby or Shell. Thanks a lot. -- Iñaki Baz Castillo