Coder Social home page Coder Social logo

uellenberg / rexs Goto Github PK

View Code? Open in Web Editor NEW
134.0 2.0 2.0 1.04 MB

A language for writing regular expressions.

License: Apache License 2.0

TypeScript 90.78% JavaScript 9.22%
re regex regular expression expressions regular-expression regular-expressions lang language compiler

rexs's Introduction

REXS

CodeFactor Codecov Build Downloads

REXS is a language to create regular expressions. It can be used to create more readable and easy-to-modify expressions that compile to clean and readable regular expressions.

For more information on REXS' syntax (or how to use it), take a look at https://esolangs.org/wiki/REXS.

Example

An example usage of REXS can be to match on any URL that starts with http:// or https://, then match any subdomains, followed by the domain and .com:

assert(START);

match("http");

repeat(0, 1) {
    match("s");
}

match("://");

repeat(0, inf, nongreedy) {
    repeat(1, inf, nongreedy) {
        match(ANY);
    }
    match(".");
}

group() {
    repeat(1, inf, nongreedy) {
        match(ANY);
    }

    match(".com");
}

assert(END);

This example will be compiled to /^https?:\/\/(?:.+?\.)*?(.+?\.com)$/.

rexs's People

Contributors

dependabot[bot] avatar uellenberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fxztam fateorg

rexs's Issues

Regex language diffs?

I like the idea of this project and think that it is helpful to easily and informatively create regular expression statements. My question is whether this is able to deal with the differences between regex languages. .NET, Perl, Python, etc, all have slightly different syntax and available syntax sugar which may or may not make the output of this project work for them.

Have you considered the differences? I could not find anything in the documentation to state what the output should be for.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.