snip
Hi, I have the string
span 111 /span span /span
And i wish to use sed to strip *only* the span tag and its
contents... is this possible ? I'm trying this expression, but it
doesn't work...
sed 's/span [^\(/span\)]+\/span//g' file
yes, it does work perfectly with the example I gave... the actual file
is some like
... span 111 span www no /span /span span yyy
/span span yyy /span ...
your command only returns ]# sed 's/\(span
.*.*\/span\)\(.*\)\(span .*.*\/span\)/\2/' file
I wish to
On Thu, Aug 28, 2008 at 03:04:22PM -0400, An wrote:
yes, it does work perfectly with the example I gave... the actual file
is some like
... span 111 span www no /span /span span yyy
/span span yyy /span ...
your command only returns ]# sed 's/\(span
An wrote:
unfortunately not... see:
# cat file
span 111 /span span /span
# sed -e 's/\/?span[^]*//g' file
span 111 /span span /span
(...nothing happens, the file is returned with no substitutions done)
I could do it with a perl script, which
Well, thanks, Yuri !
That worked much better than all that i had done ! But i have the problem
that I don't know what characters to expect... accents, ñ, etc... So i
really need a get everything between the span and the first
/span...
Regarding perl, it is perfect ! thanks !
The ? is
Hi, I have the string
span 111 /span span /span
And i wish to use sed to strip *only* the span tag and its
contents... is this possible ? I'm trying this expression, but it
doesn't work...
sed 's/span [^\(/span\)]+\/span//g' file
is there anything like it ?
I
siran wrote:
Hi, I have the string
span 111 /span span /span
And i wish to use sed to strip *only* the span tag and its
contents... is this possible ? I'm trying this expression, but it
doesn't work...
sed 's/span [^\(/span\)]+\/span//g' file
is there anything
unfortunately not... see:
# cat file
span 111 /span span /span
# sed -e 's/\/?span[^]*//g' file
span 111 /span span /span
(...nothing happens, the file is returned with no substitutions done)
I could do it with a perl script, which basically does what i