search and replace in html text
- From: bedhead@xxxxxxx (Matthias Leopold)
- Date: Fri, 28 Oct 2005 13:04:49 +0200
hi
i want to search for a pattern in html text and replace only those occurences that are not enclosed inside <> (html tag, not perl operator).
i was thinking of something like
$string =~ s/$pattern/test for <> or similar; else replace/ge;
another way could be splitting $string into an array, where html tags and other text are separated elements, but i don't know how to do this either
sounds like an easy task but i haven't managed to accomplish it yet. thanks for your help
matthias
.
- Follow-Ups:
- Re: search and replace in html text
- From: Jeff 'japhy' Pinyan
- Re: search and replace in html text
- Prev by Date: Re: Die without textoutput?
- Next by Date: Re: about running unix command in perl script
- Previous by thread: RE: about running unix command in perl script
- Next by thread: Re: search and replace in html text
- Index(es):
Relevant Pages
|