IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Regex libraries in Objective C?
I'm playing with [link|http://sourceforge.net/projects/agkit|AGKit], which is an ObjC wrapper for libpcre (Perl regular expressions). But, I need a way to escape regular expressions (like the Python [link|http://www.python.org/doc/current/lib/node99.html#l2h-728|re.escape] method does).

Any ideas? Any better regex libraries to use for GNUstep/Objective C?

I might be able to do something like this:
\n\tAGRegex *regex = [[AGRegex alloc] initWithPattern:@"[^a-zA-Z0-9]"];\n\tNSString *result = [regex replaceWithString:@"\\\\$&" inString:strToEscape];\n

Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
Expand Edited by admin March 12, 2003, 07:46:21 PM EST
Expand Edited by admin March 12, 2003, 07:51:06 PM EST
New A couple come to mind
I think there is one in misckit. [link|http://www.misckit.com|http://www.misckit.com] is an enormous pile of free ObjectiveC. I think there are methods on MiscString. I'd split em off into a category on NSString.

Another one is the OmniGroup libs - [link|http://www.omnigroup.com/developer/sourcecode/|http://www.omnigroup...loper/sourcecode/]

There is stuff in OmniFoundation. The thing about Omni code is it all builds on itself so you can end up with a lot of extra stuff if you just want one thing.

Or write your own category on NSString to interface to your fave regex lib in C.



"I made up the term 'object-oriented', and I can tell you I didn't have C++ in mind"
    - Alan Kay, OOPSLA '97
Expand Edited by tuberculosis Aug. 21, 2007, 06:27:18 AM EDT
New Cool, thanks for the links.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     Regex libraries in Objective C? - (admin) - (2)
         A couple come to mind - (tuberculosis) - (1)
             Cool, thanks for the links. -NT - (admin)

I'm sorry, I came here for an argument!
92 ms