Improve your productivity with regexp-it-cli

Improve your productivity with regexp-it-cli

Involve regular expressions to solve different kind of tasks regarding text content

Let me introduce a nodejs library called regexp-it-cli.

I am going to demonstrate some use cases where this tool would be applicable.

Regexp playground

You can experiment with regular expression by passing some content as a source and executing your trial regular over it. For example, display only matched parts for specified regexp:

Show some content in slide mode

Have you ever wanted a find functionality without dealing with manually movement handling to the next match but automatically see the next matches with some interval? Slide mode to the rescue! Use the –slide-mode option optionally providing also –slide-delay specifying a delay in seconds you’d like:

Filtering content between sections

You can use regexp in a source only after/before specified –after-regexp and –before-regexp:

Displaying first and last match

Display only first/last match by providing the –only-first-match / –only-last-match flag

Specify starting/ending line from a source to be used as a content

Apply filter to content that is going to be used a source for a regular expression by using the –starting-line-number, –ending-line-number options.

Leave a Reply

Your email address will not be published. Required fields are marked *