Skip to content
A regex-based programming language.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Examples Add new example programs and explanations/tutorial Jan 22, 2018
Retina Remove tests for cumulative capture count Apr 12, 2019
.gitignore Remove old example programs Jan 21, 2018
.travis.yml Only release on pushed tag Apr 8, 2019
CHANGELOG.md Update CHANGELOG.md Apr 12, 2019
LICENSE.md Create LICENSE.md Feb 13, 2015
README.md Add Retinate link to README.md Apr 9, 2019
build.sh
package.sh

README.md

Retina

Build Status Release

Retina is a regex-based recreational programming language. Every program works by reading a (finite) string from standard input, transforming it via a series of regex operations (e.g. counting matches, filtering lines, and most of all substituting). Retina was built on top of .NET's regex engine, but provides its own, more powerful substitution syntax.

Retina was mainly developed for code golf which may explain its very terse configuration syntax and some weird design decisions.

Running Retina

The easiest way to try out Retina is to use it right in your browser at Try It Online!

Up-to-date .NET Core binaries of Retina are provided as Github releases. Alternatively, you can build it yourself from the C# sources. The code requires .NET Core 2.2.

Source files can simply be passed as command-line arguments. For details of ways to invoke Retina see the docs.

How does it work?

Full documentation of the language can be found in the Wiki. For a (hopefully) more accessible introduction to the language's basic features see the annotated example programs. It might also be worth having a look at the changelog.

Using Retina

If you actually go to the trouble of learning Retina's fairly obscure syntax, you'll find that it's a surprisingly effective productivity tool when it comes to transforming text documents. If VS Code is your text editor of choice, you can install the Retinate extension, which lets you use Retina scripts as a powerful alternative to regular Search and Replace.

You can’t perform that action at this time.