Skip to content

SalomonSmeke/rere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

Test PyPi Entry (will transition to regular PyPi once not in Alpha)

Get started by finding some vowels with rere and ack

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