Skip to content

attempt-this-online/retina

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A regex-based programming language.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages

  • C# 99.9%
  • Shell 0.1%