Ever since learning RegEx I find numerous uses for it. My favorite editor is Text Wrangler (or BBEdit), though Drafts and Google Docs and other programs have support for basic RegEx.
What’s the best RegEx software for doing more advanced searches and replaces on iOS?
I’d be interested in that too! But also: what’s the best way to learn RegEx?
On an iPad --> RegEx knife
On the Web --> https://regex101.com
The best way to learn is to try over and over and over again.
What is it beyond “basic” reg ex that you are looking for?
BBEdit/TextWrangler I think still use the PCRE engine for regular expressions.
Workflow uses the ICU engine.
Just for completeness, I believe Reg Ex knife (I have it - great app ) also uses the ICU engine.
I learned from this tutorial site and then doing it over and over.
Drafts can handle everything I learned on there, however I found other sites that described other features such as /U and /e tags to uppercase things, /b word delimiters, etc that Drafts doesn’t do.
Perhaps it just uses a different flavor of RegEx. I’m now realizing there are different versions.
Between using Google Sheets (spreadsheet functions) and BBEdit I feel like a text ninja!
I downloaded RegEx knife previously and it looked like a way to write Reg Expressions and see how it works in real time, but not necessarily to apply it to a large chunk of text. I didn’t give it too much exploration, so I’m certain I’m missing something.
Editorial might actually be another choice. It and Pythonista (both from the same developer) use Python and the ‘re’ Python library.
That library is based on Perl’s regular expressions so my suspicion is that it is mostly PCRE compatible.
The regular expression documentation for Editorial has information about what flags and modifiers are supported. This includes the U flag (for unicode) and b flag for word boundaries. In terms of uppercase get you would apply that using other Python based functionality.
Hope that helps.
A note for completeness…
When using the Drafts’ find-and-replace features with regular expressions enabled, it’s using NSRegularExpression, the standard Apple Regex implementation, which is documented on Apple’s site.
As far as a personal recommendation for Regex testing, +1 for regex101.com.
That was exactly what was recommended by several people for a Mac user over on the Automators forum.