The main ways to get GREP on iOS were Textastic and Coda, but Coda was discontinued. Now Textastic is the go-to.
1Writer for iOS lets you do Javascript automation. A number of journalists use this as a main writing app on iOS. I think Jason Snell has used it for years (along with Editorial and Drafts).