Re: Problem: extracting substring

2008-10-01 Thread maybee
Thank you, Bob. Both work great for me. Bob Proulx wrote: > > maybee wrote: >> >> I have a string mq001234ms00567_b3.45_323x7, >> and I want to subtract the numbers from it, that is, >> I will get >> mq=001234 >> ms=00567 >> b=3.45 >> >> These number may have various digits. >> Any neat w

Re: Problem: extracting substring

2008-10-01 Thread Bob Proulx
maybee wrote: > > I have a string mq001234ms00567_b3.45_323x7, > and I want to subtract the numbers from it, that is, > I will get > mq=001234 > ms=00567 > b=3.45 > > These number may have various digits. > Any neat way doing this under bash? I myself would use 'sed' (because I always have):