Hi there,
I'm messing around with a wee script, and Im using sed to try and remove a
series of numbers from a string. The problem is that the series of numbers
is not always the same lenght.
i.e. text_I_want_to_remove=1234=part of string I want
and text_I_want_to_remove=12345=part of string I want
Im not all that good with sed, so what I have at the moment is
sed -e 's/text_I_want_to_remove=[0-9][0-9][0-9][0-9]=//' file with text
strings>
which works for the string with 4 numbers, problem arises when there are 5
or 6 numbers...
Is there perhaps a regexp that I could stick in instead of all the [0-9]'s?
Any tips would be appreciated.
R
--
Richard Eibrand
http://eibrand.netrichard at eibrand.net
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!