
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] perl regexp question
On Wed, Oct 23, 2002 at 09:24:40PM +0900,
Ryan Shaw wrote:
> is it possible to write a regexp that will do
> something like the following:
>
> file10.txt -> file11.txt
> file20.txt -> file21.txt
> file55.txt -> file56.txt
>
> etc.
>
> something along the lines of s/(\d+)/$1+1/
> though obviously that doesn't work.
>
> is it not possible to manipulate the values
> in the capture buffers like this?
In perl, s/(\d+)/$1+1/e will do what you want.
--
Shimpei Yamashita http://www.shimpei.org/
You can't have everything. Where would you put it? -- Steve Wright
Home |
Main Index |
Thread Index