You Already Have
OS-X comes with python installed, if not it is a free download, and python comes with the re library installed by default, which is one of the best regular expression libraries that I have found, what I especially like is that you can put comments into your regular expressions.
OS-X also comes with
sed installed which can both operate with regular expressions.
You Can Install
If you really must work in the browser then ipython & Jupyter notebooks is a way to go not sure if it is installed by default but it is easy to install.
On the Web
You can even try ipython/Jupyter out in your browser here without installing anything.
All of the above are free both gratis and Open Source with the possible exception of the OS/X implementations of grep & sed.
grep and sed are available on most *nix platforms, i.e. OS/X, Linux, etc., but not by default on Windows, there are free packages available that do add them though, e.g. msys.
Python/iPython/Jupyter are available for just about every platform from RaspberryPy to Supercomputers and just about everything in between including OS/X, Linux & Windows.