George Georgalis wrote:

>
> that's what I needed to hear... however replacing text (with memory
> capturing) is still a problem:
>
> perl -p -i -e 's/451(.)8229/331\12027/g;' $( find ./ -type f -name '*.html' -o -name 
> '*.txt' )

Hi George,

If you are going to do your regex work--especially at a high level--in Perl, it is 
imperative that
you read the Perl documentation.  The problem in the above sam[ple, or the one that 
jumps out at me,
is that you are using the backslash form of back reference in the replacement string.  
In the Perl
implementation, that is not appropriate.  Use the built-in scalars ($1, $2 ...) 
instead.  Backslash
backreferences are used within the scanning portion of the regex, but not in the 
replqacement
string.

Please read:
perldoc perlre

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to