ICU regular expressions for parsing strings
| Originator: | mgprot | ||
| Number: | rdar://7294182 | Date Originated: | 11.10.2009 |
| Status: | Duplicate/2141734 | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.6.1 |
| Classification: | enhancement | Reproducible: | always |
Summary: ICU Regular Expressions, including perl's extensions, are available via NSPredicate for matching but cannot be directly used for parsing text in NSString objects or input data streams. Currently, the only method for parsing strings provided by apple's public API's is via NSScanner. This is all well and good as long as the format of incoming data is perfectly clean, and has a simple and straight forward structure. The ability to use (perl's) Regular Expressions greatly simplifies a programmer's abilities to cope with, cater for and correct poorly formed or complex input strings. They would be predestinated for use in NSFormatter's subclasses, for example. Since the ICU regular expression library is included in OS X, it should be available not only for predicate matching, but also for parsing of strings. Regression: To my knowledge, regular expressions have never been provided for parsing texts in Cocoa.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!