When I mentioned "perl -pe 's/\b(.*?)/\u\L$1/g'" I actually wasn't
asking for any ObjC method with a look-alike syntax.
I actually wouldn't give a damn about "how" ("s///g") to pass a
regex pattern to a method. ;)
I was rather asking whether RegExKit (or even RegExKitLite?) would
generally be able to perform RegEx driven string replacements
where the replacement string contains stuff like "match back-
references" (\1, \2, \<named>, …) or string modificators like "\L,
\U".
Now to answer my own question:
RegExKit has this function which (according to the documentation)
seems to do just what I was looking for:
[subjectString stringByMatching:regexString
withReferenceString:templateString];
And for the latter (\L, \U, etc) I unfortunately had to find this in
the PCRE documentation:
5. The following Perl escape sequences are not supported: \l,
\u, \L,
\U, and \N. In fact these are implemented by Perl's general
string-han-
dling and are not part of its pattern matching engine. If any
of these
are encountered by PCRE, an error is generated. http://www.pcre.org/pcre.txt
Thanks a lot any way.
Vincent
Actually, RegexKit handles perl like \u \l \U \L \E case conversions.