• 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: Regex
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regex


  • Subject: Re: Regex
  • From: Dave DeLong <email@hidden>
  • Date: Tue, 18 Nov 2008 11:39:57 -0700

I should've clarified that those two things are to get the RegexKitLite additions working. When I needed the enumeration, I just followed the steps on the docs page to "Creating a Match Enumerator". It basically has you copy and paste some stuff into new files, since the RKL didn't include it by default. That has worked for me.

Alternatively, you could use the RKL addition to NSString to create an NSArray using "componentsSeparatedByRegex", and then enumerate over the array (you'd even get fast enumeration if you're using Leopard). That might give you a different approach to parsing out links.

Dave

On Nov 18, 2008, at 11:35 AM, Mr. Gecko wrote:

so I tried that and it worked but it doesn't seem to do what I need.
I am needing to do the same thing as preg_match_all in php so I can find all links and have it in an NSArray to go through and add to a database. Any ideas on how I can do that?


On Nov 18, 2008, at 11:59 AM, email@hidden wrote:

To get it to compile you need to do two things:
1. Add the "Other Linker Flag" "-licucore" to your project build settings
2. Import the RKL header into whatever files you'll use it in (alternatively, you can import it into your .pch file so that it will get included into everything automatically)


HTH,

Dave


_______________________________________________

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: 
 >Re: Regex (From: "Mr. Gecko" <email@hidden>)

  • Prev by Date: Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)
  • Next by Date: Re: release and reference counting query
  • Previous by thread: Re: Regex
  • Next by thread: Re: Regex
  • Index(es):
    • Date
    • Thread