GithubHelp home page GithubHelp logo

goregexp's Introduction

goregexp

Calculate the regular expression based on a list of fixed width numbers

example

$> cat test/data.txt 

509000
509001
509002
509004
509005
509006
509007
..more 934 numbers..

$> cat test/data.txt | goregexp

^(50670[7-8]|50671[5,8-9]|50672[0-1,4-9]|50673[0-3,9]|50674[1-3,5-7]|
506753|50677[4-8]|50900[0-2,4-7,9]|50901[0-2,4]|50902[0-9]|50903[0,5-9]
|50904[0-2,4-9]|50905[0-9]|50906[0-4,6-9]|50907[0-2,4-9]|50908[0-9]|
50909[1-2,5-9]|50910[0-1,6-9]|5091[1-9][0-9]|509[2-7][0-9][0-9]|50980
[0-7]|50983[1-9]|5098[4-6][0-9]|50987[0-7]|50989[7-9]|509900|50991[8-9]
|5099[2-5][0-9]|50996[0-4]|50997[1-9]|50998[0-6]|50999[5-9])$

see data.txt in the test folder

goregexp's People

Contributors

coc1961 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.