I'm using search and replace to solve this issue unless someone else have a better idea. Thanks.
my $removeText="<script> type="text/javascript">function....</script>"; $string = ~s/$removeText//gi; --- On Mon, 1/19/09, Bobby <[email protected]> wrote: > From: Bobby <[email protected]> > Subject: Removing block of text in string > To: [email protected] > Date: Monday, January 19, 2009, 12:00 PM > Hi, > > I have a javascript function in my long text string that i > want to remove, how do i remove a text string from starting > point to an ending point so that the javascript block > <script> to </script> is remove from my text > string? Thanks. > > Current: > string = "this is my text string <script > type="text/javascript">function....</script> > blah blah..." > > Desired Result: > string = "this is my text string blah blah..." > > > > > > > -- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > http://learn.perl.org/ -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
