Re: sed/awk/perl: How to replace all spaces each with an underscore that occur before a specific string ?

2009-08-22 Thread John W. Krahn
bolega wrote: sed/awk/perl: How to replace all spaces each with an underscore that occur before a specific string ? I really prefer a sed one liner. Example Input : This is my book. It is too thick to read. The author gets little royalty but the publisher makes a lot. Output: This_is_my_book

Re: Regular expression use

2007-08-25 Thread John W. Krahn
Nick Maclaren wrote: > In article <[EMAIL PROTECTED]>, > Mirco Wahab <[EMAIL PROTECTED]> writes: > |> > |> Using complex regular expressions is like tank destruction > |> with contact charges glued on them. Only a few people > |> will even survive the first "usage", but survivors will > |> then e