Giter Site home page Giter Site logo

rextract's Introduction

rextract

CLI tool that extracts a regex pattern from a list of urls. The tool is written in Rust and supports PCRE.

Installation

Step 1:

Visit https://rustup.rs/ and follow the instructions to get started with rust and cargo.

Step 2:

> cargo install --git https://github.com/iustin24/rextract

Usage

The tool takes a list of urls from stdin and extracts the regex supplied as an argument.

Extract HTML Title ( using lookarounds ):

> cat urls.txt
https://www.google.com/
https://youst.in/

> cat urls.txt | rextract '(?im)(?<=<title>).*(?=</title>)'
Google
Youstin

Extract UUIDs

> cat urls.txt
https://www.uuidtools.com/docs

> cat urls.txt | rextract '[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}'
b01eb720-171a-11ea-b949-73c91bba743d
b01eb720-171a-11ea-b949-73c91bba743d
b01eb720-171a-11ea-b949-73c91bba743d
b01eb720-171a-11ea-b949-73c91bba743d

rextract's People

Contributors

iustin24 avatar

Stargazers

Muhammed  avatar Thái Vũ avatar  avatar David Lakin avatar  avatar chivato avatar  avatar AmirJr avatar Abdul Mazid avatar Utsav Singh avatar Arbal avatar  avatar  avatar Espurr avatar  avatar Aliyu Yakubu avatar  avatar  avatar  avatar  avatar  avatar Viacheslav Klevchenia avatar Ahmed ALobaidy avatar Jiri S. avatar m@rco avatar  avatar 5l1v3r1 avatar Francisco Boni avatar  avatar  avatar MN Arifin avatar Colin Mason avatar cocoonk1d avatar Koda avatar Avi avatar  avatar Ajam avatar Bharath avatar Rafael  avatar xiaonan avatar  avatar @Giddyspurz avatar  avatar  avatar sp7der avatar  avatar nask0 avatar  avatar Dwi Siswanto avatar Aan avatar Jaikishan Tulswani avatar  avatar  avatar Mohammad  avatar Godson ¯\_(ツ)_/¯ avatar  avatar  avatar

Watchers

 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.