+1
Which regular expression engine?
Thanks for a great app! I have some questions regarding regular expressions, though:
- Which regular expression engine does Textastic use?
- Where can I find the syntax spec?
- What is the right syntax for including captures in the replacement text?
- Can I use case modifiers like \U \L \u in the replacement text?
TIA for the answer which I hope end up in the FAQ/manual! (Is there a FAQ distinct from the manual?
- Which regular expression engine does Textastic use?
- Where can I find the syntax spec?
- What is the right syntax for including captures in the replacement text?
- Can I use case modifiers like \U \L \u in the replacement text?
TIA for the answer which I hope end up in the FAQ/manual! (Is there a FAQ distinct from the manual?
Customer support service by UserEcho
Search and Replace in Textastic for iPhone and iPad uses the NSRegularExpression class which in turn uses the syntax that is specified by ICU.
See http://developer.apple.com/library/mac/#documentation/Foundation/Reference/NSRegularExpression_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40009708-CH1-SW53
and
http://userguide.icu-project.org/strings/regexp
Textastic supports the same replacement string syntax as TextMate. See http://manual.macromates.com/en/regular_expressions#replacement_string_syntax_format_strings
You can reference captures using $1, $2 etc.
Case foldings and conditional insertions are supported as described in the TextMate manual.
/bpj
Three years later (time flies) the `(?:CAPTURENUMBER:IF-MATCH:ELSE) syntax doesn't work anymore (on iOS)? I haven't used it in a while