Coder Social home page Coder Social logo

yare's Introduction

Yet Another Regular Expression

A simple Python regular expression library.

Installation

You may want to install this package, if so, please follow the instructions below:

Ubuntu

Change the working directory to the package folder(such as pyre0.2.1), then type the following command in terminal:

sudo python setup.py install

Windows

Open cmd(use shortcut key Win+R or open Start menu, type cmd in Run), then change the current directory to the package folder(such as pyre0.2.1), and type the following command in cmd:

python setup.py install

Other platform

Try to change the current directory to the package folder(such as pyre0.2.1) in the command line tool and type

python setup.py install

If it doesn't work, report to me if you'd like.

Supported Syntax

In total, syntax supported by the library is the most basic ones. As following described in detail:

  1. selection: a|b

  2. concatenation: ab

  3. loop: a*

Special Symbol

  1. \: escape. To indicate backslash itself, use \\ instead.

  2. \e: epsilon.

  3. |: selection. To indicate vertical bar, use \| instead.

  4. *: loop. To indicate star, use \* instead.

  5. ( and ): group. To indicate parentheses, use \( and \) instead.

Best Practice

I strongly recommend you use the provided functions and constants rather than writing literally.

I have several good reasons for this. First, the code will be more easy to read. Even some one who hasn't learnt the syntax can read your code. Second, I am considering expand the syntax, and then I can optimize for effeciency in the provided functions. Third, maybe some day I consider the syntax ugly and then changed it, if you only use the provided functions, you don't need to change a simgle line of your code.

Honor Code

You should NOT copy it to complete your homework.

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.