Retina: a regex-based recreational programming language

栏目: IT技术 · 发布时间: 5年前

内容简介: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

Retina

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 .


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

大数据日知录

大数据日知录

张俊林 / 电子工业出版社 / 2014-9 / 69.00元

大数据是当前最为流行的热点概念之一,其已由技术名词衍生到对很多行业产生颠覆性影响的社会现象,作为最明确的技术发展趋势之一,基于大数据的各种新型产品必将会对每个人的日常生活产生日益重要的影响。 《大数据日知录:架构与算法》从架构与算法角度全面梳理了大数据存储与处理的相关技术。大数据技术具有涉及的知识点异常众多且正处于快速演进发展过程中等特点,其技术点包括底层的硬件体系结构、相关的基础理论、大规......一起来看看 《大数据日知录》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换