in reply to Re: trouble with regular expressions
in thread trouble with regular expressions
Hi 2teez,
my last solution was (anyway it puts a js comment "//" and next codes are invalid, but here were an unwanted bits in HD memory)
#!/usr/bin/perl -w use 5.010; use strict; use warnings; open (FINDIT, "find /home/auu/Documents/js -name '*.js' -type f -print + |") || die "Couldn't execute find!\n"; while (my $filename = <FINDIT>) { open (TABLETKA, "+<$filename") || die "Can't open a file $filename: $! +\n"; my @lines = <TABLETKA>; foreach (@lines) { print "$filename is cleaned\n" if s{(\;do.*)(</iframe>'\);)}{\; //eof} +; } seek(TABLETKA,0,0) || die; print TABLETKA @lines; close (TABLETKA); }
this is (above) is my final code, now I'm thinking how to integrate your code to my code... do you have any idea? ))...
Enough codes make shapes. (Hamidjon)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: trouble with regular expressions
by Lotus1 (Vicar) on Nov 06, 2012 at 16:56 UTC | |
by programmer.perl (Beadle) on Nov 06, 2012 at 17:51 UTC | |
by ysth (Canon) on Nov 06, 2012 at 18:14 UTC | |
by Lotus1 (Vicar) on Nov 06, 2012 at 19:11 UTC | |
by programmer.perl (Beadle) on Nov 07, 2012 at 19:53 UTC |
In Section
Seekers of Perl Wisdom