All Projects → sagebind → Retest

sagebind / Retest

Licence: apache-2.0
Command-line regular expression tester

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Retest

Ripgrep
ripgrep recursively searches directories for a regex pattern while respecting your gitignore
Stars: ✭ 28,564 (+219623.08%)
Mutual labels:  regex
Sysadmin Util
Tools for Linux/Unix sysadmins.
Stars: ✭ 761 (+5753.85%)
Mutual labels:  utilities
Shallow Clone
Make a shallow clone of an object, array or primitive.
Stars: ✭ 23 (+76.92%)
Mutual labels:  regex
Notepad
[iOS] A fully themeable markdown editor with live syntax highlighting.
Stars: ✭ 705 (+5323.08%)
Mutual labels:  regex
Utils
A collection of useful PHP functions, mini classes and snippets that you need and can use every day.
Stars: ✭ 750 (+5669.23%)
Mutual labels:  utilities
Pihole Regex
Custom regex filter list for use with Pi-hole.
Stars: ✭ 799 (+6046.15%)
Mutual labels:  regex
Sakura
SAKURA Editor (Japanese text editor for MS Windows)
Stars: ✭ 689 (+5200%)
Mutual labels:  regex
Isomorph
Shared utilities for browsers and Node.js
Stars: ✭ 9 (-30.77%)
Mutual labels:  utilities
Styled Tools
Useful interpolated functions for CSS-in-JS
Stars: ✭ 761 (+5753.85%)
Mutual labels:  utilities
Chr
🔤 Lightweight R package for manipulating [string] characters
Stars: ✭ 18 (+38.46%)
Mutual labels:  regex
Lain
Awesome WM complements
Stars: ✭ 716 (+5407.69%)
Mutual labels:  utilities
Commonregex
🍫 A collection of common regular expressions for Go
Stars: ✭ 733 (+5538.46%)
Mutual labels:  regex
Regex Assert Symfony
Common Regex to use with Assert in Symfony's entity
Stars: ✭ 5 (-61.54%)
Mutual labels:  regex
Date Fns
⏳ Modern JavaScript date utility library ⌛️
Stars: ✭ 27,650 (+212592.31%)
Mutual labels:  utilities
Verbalex
A library for creating complex, composable regular expressions with the reader & writer in mind. 🔍
Stars: ✭ 26 (+100%)
Mutual labels:  regex
Sketch Find And Replace
Sketch plugin to do a find and replace on text within layers
Stars: ✭ 693 (+5230.77%)
Mutual labels:  regex
Py regular expressions
Learn Python Regular Expressions step by step from beginner to advanced levels
Stars: ✭ 770 (+5823.08%)
Mutual labels:  regex
Omniutils
A utility library for Java SE
Stars: ✭ 13 (+0%)
Mutual labels:  utilities
Whitespace Regex
Regular expression for matching the whitespace in a string.
Stars: ✭ 9 (-30.77%)
Mutual labels:  regex
Jmcs
Java framework to homogenize your GUI across all the 3 main desktop OS, and further integrates your app to them.
Stars: ✭ 5 (-61.54%)
Mutual labels:  utilities

retest

Retest is a regular expression tester that can be used in the terminal. It is meant to be a simple and quick utility to aid you in developing regular expressions. Like regular expressions 101, but in the terminal.

Features

  • Piping! You can pipe a subject string to match against into standard input.
  • Nested highlighting! If the regular expression contains groups and subgroups, they will be highlighted in different colors than the whole match.
  • All matches! Retest finds all non-crossing matches in the subject string.
  • List of matches! You can optionally display all matches as a formatted list, which includes the match order and the indexes in the string.

Would you like to suggest new features? Make an issue on GitHub describing the feature, or shoot me an email to ask me directly.

Install from release

Binaries for Linux are provided for each release and available on the releases page. Just download a "retest" binary and place it somewhere that is in your $PATH (like /usr/local/bin), and you're ready to go.

Compiling and installing from source

First, get the source code by cloning from GitHub:

$ git clone https://github.com/sagebind/retest.git
$ cd retest

You can install dependencies and compile all at once using cargo:

$ cargo build

A simple Makefile is also provided for easily installing and uninstalling retest. To install globally, you can follow the traditional Linux steps:

$ make
$ sudo make install

This will compile retest and place a globally available executable into /usr/local/bin. Similarly, you can uninstall retest with

$ sudo make uninstall

Usage

Retest accepts one regular expression as an argument, and then matches it against a subject string. The subject will be printed back out, with all matches found highlighted. For example:

$ echo 'fee fi fo fum' | retest 'f\w\w'

will output something like the following (text in square brackets would be highlighted):

[fee] fi fo [fum]

By default, the subject is read from standard input. If you'd like to specify the subject as an argument, you can use the --subject (or -s) option:

$ retest '\w+\s' --subject 'fee fi fo fum'

For more options and tricks, check the help message from the program:

$ retest --help

Where to get help

Need help? Just send me an email with your questions. Be sure to add "retest" to the message subject line so I know how I can help you out.

License

All documentation and source code is licensed under the Apache License, Version 2.0 (Apache-2.0). See the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].