• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Regular Expressions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Regular Expressions (From: Philip Juel Borges <email@hidden>)

  • Prev by Date: Re: Removing quit button from dock menu
  • Next by Date: Re: Removing item from CollectionView by drag it out.
  • Previous by thread: Re: Regular Expressions
  • Next by thread: NSValueTransformer
  • Index(es):
    • Date
    • Thread