Your specification of 'first 3 characters are whitespaces and/or a number followed by ":"' is a bit conflicting - does that include 3 whitespaces followed by a number? should 3 whitespaces be followed by a colon? - but here's the best match I can come up with for that description (I'm guessing the answer to both of the above is "no"):
#!/usr/bin/perl -w use strict; # Build a regex of "\d\d\d:|\s\d\d:|\s\s\d:|\s\s\s" my $str = join ":|", map { '\s'x$_ . '\d'x(3-$_) } 0 .. 3; while (<>){ s/^$str//; # Remove anything that matches regex from start of line print; }
In reply to Re: Clean Up downloaded "messy" script?
by oko1
in thread Clean Up downloaded "messy" script?
by matze77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |