Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for baked-in Regular Expression matched string colorization #108

Open
pregenRobot opened this issue Jul 6, 2021 · 0 comments
Open

Comments

@pregenRobot
Copy link

pregenRobot commented Jul 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant