From kde-core-devel Sun Oct 07 13:14:05 2007 From: David Jarvie Date: Sun, 07 Oct 2007 13:14:05 +0000 To: kde-core-devel Subject: Re: [PATCH] make ksnapshot increment the last number Message-Id: <200710071414.05944.lists () astrojar ! org ! uk> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=119176568530801 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