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 .


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

查看所有标签

猜你喜欢:

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

走出软件作坊

走出软件作坊

阿朱 / 电子工业出版社 / 2009-1 / 39.80

《走出软件作坊》这本书提供了解决国内小型IT企业发展的过程中会遇到的项目管理问题的若干方法。主要以作者自身多年工作的宝贵经验,来谈软件公司的项目管理和团队建设,包括对中小软件公司软件开发组织结构、团队文化、软件过程管理、团队激励、绩效考核、职业发展规划、未来业界发展趋势、个人素质提升等,具有实际指导意义。主要读者对象是IT企业的研发主管、项目经理和软件开人中同,以及即将到IT企业工作的高校毕业生。一起来看看 《走出软件作坊》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具