Re: [patch] support back-references when bulk renaming

"Thomas Leonard" <[email protected]> Fri, 5 Dec 2008 20:37:26 +0000
Newsgroups gmane.comp.desktop.rox.devel
Message-ID <[email protected]>
2008/12/5 RogutÄ—s <[email protected]>:
> Thomas Leonard (2008-11-30 10:44):
>> 2008/11/27 Rogutes <[email protected]>:
>> > Hello,
>> >
>> > I thought it would be nice to have back-references support in the bulk
>> > renaming dialog, so one could, for example, type
>> >
>> > Replace: "\(.*\) (\([0-9]\{4\}\))"
>> > With: "[\2]: \1"
[...]
> I have attached an updated patch. Looks much better now, thanks for the
> advice!

> I haven't added the REG_EXTENDED cflag to regcomp() in this patch, but
> I agree that it could be the default.

OK - applied!

I added the extended flag, and some unit-tests (edit global.h to
enable them). I think there was a minor problem with patterns of the
form

  \\\1

This now results in a \ followed by the substitution. Does it look OK?

http://repo.or.cz/w/rox-filer.git?a=commitdiff;h=a13d71545be69c651f4cf9a050153fb7094f24d2;hp=f928d8d5ec2102f00bf84e90da552f65c17c5730

Thanks!


-- 
Dr Thomas Leonard		ROX desktop / Zero Install
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/