GithubHelp home page GithubHelp logo

dotwork / rex Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 65 KB

Provides a class 'Rex' for describing regular expression patterns in normal english. This is a pet-project that I hope to develop into a reliable tool over time. In the future, I aim to add some powerful debugging features to introspect the Rex expression and notify the developer of bugs in the expression. Ultimately, I intend for this library to allow new programmers to use regular expressions in their projects and educate them on what they are and how they work. WARNING: This library is not production-ready and should only be used for practice and exploration. Contributions are most welcome.

License: MIT License

Python 19.73% HTML 80.27%

rex's Introduction

rex

WARNING: This library is not production-ready and should only be used for practice and exploration.

Provides a class 'Rex' for describing regular expression patterns in normal english. This is a pet-project that I hope to develop into a reliable tool over time. In the future, I aim to add some powerful debugging features to introspect the Rex expression and notify the developer of bugs in the expression. Ultimately, I intend for this library to allow new programmers to use regular expressions in their projects and educate them on what they are and how they work. Contributions are most welcome.

Here is a brief example of how Rex can be used to describe a regular expression pattern.

    rex = Rex().group.open_parenthesis.a.b.c.close_parenthesis.end_group
    rex.compile()

This produces the same results as:

    re_compiled = re.compile("(\(abc\))")

See the test_rex.py file for more examples.

rex's People

Contributors

dotwork avatar

Watchers

James Cloos avatar  avatar

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.