Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 2008 20:05:02 -0500
From:      "Paul A. Procacci" <pprocacci@datapipe.com>
To:        siran <anmichel@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: sed html tags
Message-ID:  <48B356BE.3080501@datapipe.com>
In-Reply-To: <41baaeae-0c1d-4a73-9540-8049b837261c@l64g2000hse.googlegroups.com>
References:  <41baaeae-0c1d-4a73-9540-8049b837261c@l64g2000hse.googlegroups.com>

next in thread | previous in thread | raw e-mail | index | archive | help
siran wrote:
> 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
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>   
 sed -E 's/<\/?span[^>]*>//g'

Myabe that's what you want?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48B356BE.3080501>