Re: Regular Expressions
Re: Regular Expressions
- Subject: Re: Regular Expressions
- From: Jens Alfke <email@hidden>
- Date: Mon, 22 Feb 2010 08:20:59 -0800
If you need more flexibility, you can write a short script in a language like Ruby, Perl or Python to do it. The advantage is that you can use arbitrarily powerful string and logical operators to transform the match string before replacing it. Perl and Ruby both have a command-line flag that says "run the script on every line of input" so you can pretty much do this as a one-liner. (I'd show you an example but I haven't touched Ruby in about a year so it's gotten paged out of my working memory...)
You can then add the script to Xcode's script menu, or invoke it as a run-script build phase.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden