Comments (9)
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.
@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.
Wonderful, thank you for the great work @kpp + @BurntSushi 🎉
from ripgrep.
@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.
--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.
@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.
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.
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.
@BurntSushi, thanks, but when --only-matching
will be implemented?
from ripgrep.
Related Issues (20)
- Negation pattern/whitelisting is ignored from `--ignore-file` HOT 8
- .gitignore rule is matched incorrectly while in a subdir
- Adjacent replaced multiline matches result in wrong line numbers HOT 4
- Feature Request (globset): Expose `MatchStrategy` HOT 6
- Support decompression flags / smart use of zstd --long HOT 1
- Add `Select-String`/`sls` to the benchsuite HOT 6
- JSON indexing off HOT 4
- Feature Request: Early Bail Out for Time-Consuming Regex Matches in pcre2 HOT 4
- [perf] rg does not use globs to prune recursion when it can HOT 4
- cursor disappearing HOT 1
- failing test: f2361_sort_nested_files
- The same `LineTerminator` is being used for searching and printing
- `--pre` doesn't work on Windows (CMD, MSYS2 bash, Powershell) HOT 16
- ARMv8 release binary for RPI 5 HOT 2
- ripgrep 14.1.0 exit silently when stdin is not connected (GNU parallel without --tty) HOT 8
- Feature Request: search for binary data by supplying a hex string HOT 1
- Is it possible to add a search for just a set of directories as a type? HOT 1
- Allow following symlinks to files
- WalkDir ignores files that are in .gitignore outside of current git repository HOT 2
- Multiple quirks in ignore behavior HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ripgrep.