D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Regular expression stupidity

 

James Fidell wrote:
> Michael Mortimore wrote:
>> wouldn't something like this be easier?
>> 's|\\|/|g'
>>
>> or do you actually want to keep some backslashes?
> 
> In which case, wouldn't using sed with an expression like:
> 
>    !^\+\+\+/s!\\!/!g
> 
> do the trick?

I will give that a go, yes I may need to keep backslashes as the patches
could contain string literals with escape sequences etc but locking on
to that +++ on the patch header as you said should solve that.

Thanks

Robin



Attachment: signature.asc
Description: OpenPGP digital signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html