---
title: Convert RegExRX native files to Markdown snippets
date: 2023-08-21 08:00
slug: convert-regexrx-native-files-to-markdown-snippets
categories:
- Code
tags:
- markdown
- regexrx2md
- regex
---

[regexrx]: https://apps.apple.com/us/app/regexrx/id498370702?mt=12&uo=4&at=10l4tL&ct=searchlink
[Snibbets]: /projects/snibbets/
[regexrx2md]: /projects/regexrx2md/

I _love_ [RegExRX] for testing regular expressions. It has all the features I could want from such an app, including the ability to copy a working regex out prepared for a range of languages. It's what I've stuck with for years.

As I experiment with my regexes, I'll save them in RegExRX, creating a `.regexrx` file in my Snippets folder (where [Snibbets] works). In order to make these searchable with Snibbets, I use a script to convert the XML-based `.regexrx` file to a Markdown file with the flags, search string, and the replace string and test text if they exist. I [turned this into a gem][regexrx2md] for anyone who should happen to run into such a need.

You can install the tool with `gem install regexrx2md`. Once installed, just use `regexrx2md -o MARKDOWN_DIRECTORY SOURCE_DIRECTORY` to output a bunch of Markdown files from a directory of `.regexrx` files. You can also convert a single file just by providing a file link as the argument instead of a directory.

There are options for manipulating the filename, the Markdown template, and the output directory. See [the docs][regexrx2md] for more info. While I hope this is useful to someone, it was something I useful enough to me to invest the time in, so it's already paid off sufficiently. I just thought I'd share... just in case.

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
