Coder Social home page Coder Social logo

Comments (9)

gavinfoley avatar gavinfoley commented on May 22, 2024 62

To counterbalance the above comment, I wanted to say that I use and enjoy this excellent tool you've created every day, and I appreciate whatever improvements are made whenever they are made. Thanks for using some of your limited free time to make my life and others' easier.

from ripgrep.

BurntSushi avatar BurntSushi commented on May 22, 2024 41

@sergeevabc This issue tracker isn't place to give me advice on how to schedule my free time or to shame anyone into doing work on their free time. Future comments in that vain won't be tolerated.

from ripgrep.

22a avatar 22a commented on May 22, 2024 15

Wonderful, thank you for the great work @kpp + @BurntSushi 🎉

from ripgrep.

BurntSushi avatar BurntSushi commented on May 22, 2024 13

@sergeevabc I don't know. It happens when it happens. I do this in my free time and I don't typically schedule my free time in advance. Sorry.

from ripgrep.

BurntSushi avatar BurntSushi commented on May 22, 2024 2

--replace already exists (and I agree it's kind of verbose for this case).

-o/--only-matching is an option on grep, so I'm OK adding this.

from ripgrep.

BurntSushi avatar BurntSushi commented on May 22, 2024 2

@sergeevabc Yes, it would solve your problem. But there is a work-around for now:

$ host -t A wikipedia.org | openssl dgst -sha256 | rg -N '^.*([A-Fa-f0-9]{64}).*$' --replace '$1'

from ripgrep.

cwillu avatar cwillu commented on May 22, 2024

Note that surrounding the search regex with .( ). and then using --replace $1 will do this; pretty verbose though, especially when using it in a pipeline.

from ripgrep.

sergeevabc avatar sergeevabc commented on May 22, 2024

Input

host -t A wikipedia.org | openssl dgst -sha256 | rg --no-line-number [A-Fa-f0-9]{64}

Output

(stdin)= 0d00409623da8ae039de83200af7f6fa9211bb13e1b3e10ea45142cd08b3e50b

Hash is coloured red, but I need hash (that red part) only.
Would the considered option --only-matching be of help?

from ripgrep.

sergeevabc avatar sergeevabc commented on May 22, 2024

@BurntSushi, thanks, but when --only-matching will be implemented?

from ripgrep.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.