Am Freitag, 11. M�rz 2005 07.21 schrieb Zeng Nan:
> Hi,
>
> Suppose there is a string "var = 123", I want to substitute 123 by 456,
> then I have to write like this "s/(var\s+=)\s+\d+/\1 123/". Is there a way
> so that I can combine ' ' into the parenthesis as
> "s/(var\s+=\s+)\d+/\1456"? I know \1456 is not correct, but how can I
> seperate \1 and 456 without using a space? I hope I have made myself
> understood.

s/(var\s+=\s+)\d+/${1}456/;

perldoc perlre

--
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