> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 13, 2003 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: String Stripping?
> 
> 
> Hello all,
>   
>    I need to strip some HTML tags from a string....However, 
> the complete tags are not consistent, so I would like to 
> remove all the text between certain strings I 
> specify.....regardless of what is between them!
> 
>    For example:
>      I would like to remove all the text starting with 
> "<table" and ending with ">"
> 

so you want to remove all chars within (and including) '<' and '>' ?
if so, try the following

<snip>
use strict;

$s = 'hi there <how are> you <tod>ay?  some more <stuff/>.  and <a touch>
more.';
$s =~ s/<.*?>//g;
print $s;
</snip>


>     I only no how to remove exact matches....Does Perl have a 
> function that can handle this?
> 
> Thanks in advance,
> Kurt
> 
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to