[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [PATCH] make ksnapshot increment the last number
From: David Jarvie <lists () astrojar ! org ! uk>
Date: 2007-10-07 13:14:05
Message-ID: 200710071414.05944.lists () astrojar ! org ! uk
[Download RAW message or body]
On Sunday 07 October 2007 06:19:35 Ho ng Đức Hiếu wrote:
> Hi,
>
> My previous patch has a problem, it only matches the last digit in
> the filename, so "snapshot19.png" is followed by "snapshot110.png".
> amrit on #qt suggested using "[^\\d](\\d+)" to match as far to the
> left as possible. This regexp doesn't match when the only number is at
> the start of the filename, so I used a second regexp to match that
> case.
How about "[^\\d]?(\\d+)" to cover both cases?
--
David Jarvie.
KAlarm author and maintainer.
http://www.astrojar.org.uk/kalarm
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic