gmoe / rere

regex πŸ“ and πŸ”

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rere: regex retrieve

Codacy Badge

rere is a regex notepad and search tool. It helps you save patterns you use frequently, and search for ones you use infrequently.

It is very much still in development, and should be considered just an alpha MVP for now.

Get started by finding some vowels

pip install --index-url https://test.pypi.org/simple/ reretrieve
ack $(rere vowels)

More usage

Add a pattern:

$ rere --add "[aeiou]" vowels|v
[aeiou]

Retrieve it:

$ rere v
[aeiou]
$ rere vowels
[aeiou]

Overwrite it:

$ rere --add [aeiouAEIOU] --force vowels
[aeiouAEIOU]

Remove it:

$ rere --remove vowels
[aeiouAEIOU]

Retrieve it from the web!

$ rere vowels
[aeiou]

Use it with ack to find vowels:

ack $(rere vowels)

Donations

Donate

You do not have to donate. I do not need your money. But if you like the tool and want to buy me a coffee, I will definitely appreciate it!

Patternfile format

The patternfile format is VERY much going to change. Probably to some sensible TOML/YML/JSON thing. Once that transition happens, the idea is to allow specifying the regex flavor.

  • PATTERNNAME:PATTERN – general formatting.
  • PATTERNNAME1|PATTERNNAME2:PATTERN – two acceptable names.
  • PA:TTERNNAME:PATTERN – bad pattern name.
  • PATTERNNAME:[:] – totally fine.
  • PATTERNNAME:: – totally fine.
  • PATTERNNAME:[ \t\n] – also fine.

About

regex πŸ“ and πŸ”

License:MIT License


Languages

Language:Python 100.0%