Support for baked-in Regular Expression matched string colorization
pregenRobot opened this issue · 0 comments
pregenRobot commented
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.