RegexKitLite

Create lightweight objective-C regular expressions for Mac OS X
Download

RegexKitLite Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Price:
  • FREE
  • Publisher Name:
  • John Engelhart
  • Publisher web site:
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 114 KB

RegexKitLite Tags


RegexKitLite Description

Create lightweight objective-C regular expressions for Mac OS X RegexKitLite will allow developers to create lightweight Objective-C Regular Expressions for Mac OS X using the ICU Library.RegexKitLite enables easy access to regular expressions by providing a number of additions to the standard Foundation NSString class. RegexKitLite acts as a bridge between the regular expression engine in the International Components for Unicode (dynamic shared library that is shipped with Mac OS X) and the NSString class.NOTE: RegexKitLite is licensed and released under the BSD License. Here are some key features of "RegexKitLite": · Uses the regular expression engine from the ICU library which is shipped with Mac OS X. · Automatically caches compiled regular expressions. · Uses direct access to a strings UTF-16 buffer if it is available. · Caches the most recent conversion in to ICUs required UTF-16 format for any string that requires it. · Multithreading safe. · Uses Core Foundation for greater speed. · Very easy to use, all functionality is provided by a category extension to the NSString class. · Consists of two small files, a header and the Objective-C source. What's New in This Release: · Ticket #2027975 - Request for captureCount like functionality. · Ticket #2779301 - Request for componentsMatchedByRegex: functionality. · Ticket #2779965 - Request that documentation be updated with how to match a literal with a regex specified using a string literal: @"\";. · Ticket #2786878 - Request for isRegexValid functionality. · The GCC variable cleanup __attribute__() is now used to provide an extra safety net around the use of the RegexKitLite spin lock. The cleanup function ensures that if the spin lock was locked by a function that it was also unlocked by the function. If a function obtains the lock but does not unlock it, the cleanup function forcibly unlocks the spin lock. · Minor GC changes. Some minor changes in the way heap buffers were allocated was required to support the new methods that return a NSArray. · 64-bit cleanup. Various literal numeric constant values had either L or UL appended to them if they were used with NSInteger, NSUInteger, or various other 'long' data types. · 64-bit cleanup. Added checks to verify that a strings length is < INT_MAX and throw an exception if it isn't. This check was added because ICU uses signed 32-bit int values to represent offsets. · Changed some macros to static inline functions for compile-time prototype checking. · Updated examples/NSString-HexConversion.m. 64-bit tidies. · Updated examples/RKLMatchEnumerator.h. Added the deprecated attribute to matchEnumeratorWithRegex:. · Updated examples/RKLMatchEnumerator.m. 64-bit tidies. Added a preprocessor warning that RKLMatchEnumerator has been deprecated in favor of componentsSeparatedByRegex:. · Updated the documentations visual style to better match the style currently used by Apple. · Many small DocSet tweaks and improvements. Bug fixes: · Bug #2319200 - The documentation for stringByReplacingOccurrencesOfRegex:withString: (and related methods) was updated. The text for the Returned Value section was obviously copy and pasted from somewhere else and never updated. This has been fixed. · Bug #2408447 - stringByReplacingOccurrencesOfRegex: bug fixed. There was a bug in ICU that would cause a search and replace operation to fail with U_BUFFER_OVERFLOW_ERROR, which would then cause RegexKitLite to throw RKLICURegexException, if the length of the replaced string was significantly longer than the original string. ICU ticket #6656 · componentsSeparatedByRegex: bug fixed. When the regular expression matched the tail end of the string, an extra zero length string was incorrectly added to the results. · componentsSeparatedByRegex: bug fixed. The results returned by the ICU function uregex_split() was found to be different that the results returned by the perl split() function. ICU ticket #6826 · rangeOfRegex, stringByMatching: bug fixed. A bug was fixed where the inRange: parameter was not correctly honored. · If RegexKitLite was able to get direct access to a strings UTF-16 buffer, there was a very remote chance that RegexKitLite would continue to use a pointer to a strings older UTF-16 buffer if the string mutated and allocated a new buffer. The pointer to a strings direct buffer is now verified before each use. · isMatchedByRegex:inRange: was never documented. Fixed.


RegexKitLite Related Software