Donate Share

RegexKit

File Release Notes and Changelog

Release Name: RegexKitLite-2.2

Notes:
This release contains several large documentation additions and a few bug fixes. No new major functionality was added.


Changes: This release contains several large documentation additions and a few bug fixes. No new major functionality was added. Documentation Changes: Added a section covering ICU Regular Expression Character Classes Added a section covering Unicode Properties, which are specified in a regular expression with \p{Unicode Property Name} and \P{Unicode Property Name}. Added the Regex Cookbook section. Special Copy to Clipboard functionality is enabled for Safari users that allows a regular expression in this document that is selected and Copied to the Clipboard to be automatically escaped so the regular expression can be pasted directly in to your source code, ready to be used, with no additional work required. Added the Epilogue section. This section is meant to be less formal, where I can place bits and pieces that don't fit elsewhere or editorialize on some topic. A number of small additions, deletions, and edits through out the documentation. Changes: A new compile time configuration option, RKL_METHOD_PREPEND, can be used to add custom prefix to all the RegexKitLite methods. For example, setting RKL_METHOD_PREPEND to xyz_ would cause stringByReplacingOccurrencesOfRegex:withString: to become xyz_stringByReplacingOccurrencesOfRegex:withString:. This is for users who prefer that any category additions to the core classes, such as NSString, have a user defined prefix to prevent the possibility of user defined method names interfering with later system defined method names. Support for iPhone low memory notifications. When it can be determined at compile time that the iPhone is being targeted, the preprocessor flag RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS is enabled to add code that automatically registers for low memory notifications on the iPhone. When a low memory notification is received, RegexKitLite will flush all its caches, freeing the memory used to hold the cached data. Bug fixes: Bug 2105213: Fixed a bug in stringByReplacingOccurrencesOfRegex:withString: and replaceOccurrencesOfRegex:withString: where if the receiver was an empty string (i.e., @""), then RegexKitLite would throw an exception because the ICU library reported an error. This turned out to be a bug in the ICU library itself in the uregex_reset() function (and the methods it calls to perform its work). A bug was opened with the ICU project: http://bugs.icu-project.org/trac/ticket/6545. A work-around for the buggy behavior was put in place so that if the ICU library reports a U_INDEX_OUTOFBOUNDS_ERROR error for a string with a length of zero, that error is ignored since it is spurious. Thanks go to Andy Kim for reporting this. Bug 2050825: Fixed a bug with NSScannedOption when targeting the iPhone. NSScannedOption is not available on the iPhone, so C Pre-Processor statements were added to ensure that NSScannedOption is not referenced when Objective-C Garbage Collection is not enabled. Thanks go to Shaun Inman for reporting this first. Fixed a bug in stringByReplacingOccurrencesOfRegex:withString: and replaceOccurrencesOfRegex:withString: where an internal assertion exception would be thrown if the string to search and the replacement string were both zero length strings (i.e., @"").