[PATCH] make ksnapshot increment the last number

David Jarvie lists at astrojar.org.uk
Sun Oct 7 14:14:05 BST 2007


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




More information about the kde-core-devel mailing list