Re: Need help w/ reqexp, capture and substitue
- From: Shawn@xxxxxxxxxxxx (Shawn Milochik)
- Date: Sun, 29 Oct 2006 19:44:30 -0500
This seems to work for me:
#!/usr/bin/perl -w
use strict;
while (<STDIN>) {
chomp;
print "Original: $_\n";
$_ =~ s/^([^@]+)(@.+&\d+&)([&]{5})/$1$2$1$3/;
print "Modified: $_\n";
}
Hope it helps.
Shawn
.
- Follow-Ups:
- Re: Need help w/ reqexp, capture and substitue
- From: Dennis G. Wicks
- Re: Need help w/ reqexp, capture and substitue
- References:
- Need help w/ reqexp, capture and substitue
- From: Dennis G. Wicks
- Need help w/ reqexp, capture and substitue
- Prev by Date: Need help w/ reqexp, capture and substitue
- Next by Date: Yay, I finally learned how to get screwed by Perl
- Previous by thread: Need help w/ reqexp, capture and substitue
- Next by thread: Re: Need help w/ reqexp, capture and substitue
- Index(es):