Skip to content

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

Description

@pregenRobot

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions