<snip>

> > >>> Hi, I have the string
> > >>>
> > >>> <span xxxx> 111 </span> 2222 <span yyyy> 3333 </span>
> > >>>
> > >>> And i wish to use sed to strip *only* the "<span xxxx>" tag and its
> > >>> contents... is this possible ? I'm trying this expression, but it
> > >>> doesn't work...
> > >>>
> > >>> sed 's/<span xxxx[^\(</span>\)]+<\/span>//g' file
> > >>>
> > >>> is there anything like it ?
> > >>>
> > >>> I would like to obtain
> > >>>
> > >>> 2222
> > >>>
> > >>>
> > >>>
> > >>> I hope someone can help,
> > >>>
> > >>> thank you,
> > >>>
> > >>> siran

If you haven't yet solved the above problem, give the following a try:

sed 's/\(<span .*>.*<\/span>\)\(.*\)\(<span .*>.*<\/span>\)/\2/'


regards,
joseph

<snip>
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to