Code Monkey home page Code Monkey logo

regexforce's Introduction

#Regular expression solver!

Taking inspiration from the site http://regex.alf.nu/, this program aims to be able to brute force regular expressions based on sample "good" and "bad" sets of input.

Currently it takes a list of valid regular expression symbols (To improve speed, they can be commented out with # in regexes.reference) and combines that with all symbols found in the good and bad list of files. It then uses this combined list to brute force a regular expression that matches the good and does not match the bad!

You can run it like:

node regexforce.js -g good.example -b bad.example -n 4
  • -g: Line-delimited good words
  • -b: Line-delimited bad words
  • -n: Max length of regular expression to generate (beware, this grows exponentially with the size of the dataset!)

Next up:

  • Some form of logic to stop generating so many trash expressions
  • Limited option (use a number of lines from good and bad files which have similar character sets to cut down on execution time)
  • Generic mode (do not consider the characters in the text, only use regular expression symbols

regexforce's People

Contributors

steven-ireland avatar

Watchers

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