CodeRunner and Patterns Quick Review

I just started using CodeRunner and Patterns for script writing.[1] They are both available in the MAS.

CodeRunner supports AppleScript, Python, Ruby, Shell and several more. It provides syntax highlighting and code completion. Importantly it also provides a console window to display the output as well as a mode for accepting input. Sure, it’s not BBEdit, but it’s lightweight and single minded. There are not many frills but it works great.

Patterns is also by Nikolai Krill. It’s also for writing code but directed specifically at RegEx. The interface is simple but effective. Place some example search text in one box and start writing some RegEx in another box. There is a handy pop-up panel cheat-sheet for quick reminders.

Patterns

The killer feature is that after writing the expression, I can select a language and then hit the “Copy Code” button. I get the language specific version of the RegEx on my clipboard. The example above gives this for Python

import re re.search(“%252”, searchText, re.M)

… and this for Javascript

searchText.match(/%252/m)

Patterns also offers warnings when a language does not support a specific RegEx option.

I have not been using it very long but I’m already thrilled with the results. I avoid RegEx like the plague and as a result, I’m not very good at it. Patterns should help me use more RegEx while also remaining pathetically bad at it.


  1. Affiliate Links to the MAS