rainbow icon indicating copy to clipboard operation
rainbow copied to clipboard

Support for baked-in Regular Expression matched string colorization

Open pregenRobot opened this issue 3 years ago • 0 comments

Hello all, love this project.

I was hoping if a pull request that implements a feature to colorize strings based on a regular to match will be accepted.

I was hoping something along the lines of:

{name: "Bob Jones", age: 19}.to_json.red(:matches => /(?<=)name:\s"[^"]*"/) # Highlights all the name properties 

This is going to be extremely helpful for logging out JSONs and other streams of data making it easier to identify particular lines dynamically that you don't have control over.

I am willing to work on this pull request.

pregenRobot avatar Jul 06 '21 03:07 pregenRobot