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)
- Using `--sortr path` gives error "thread 'main' panicked"/"not yet implemented" HOT 2
- 14.x.x release now causes "dpkg-deb: error: 'ripgrep_14.0.3_amd64.deb' is not a Debian format archive" HOT 2
- Disabling color output seems to be broken HOT 1
- Unicode characters cause incorrect column HOT 2
- Issues with ripgrep finding files with no newline at end of text file HOT 2
- Binaries for Arm64 Windows HOT 1
- Search Failure Inside PowerShell Session HOT 6
- Inline flag (?x) with comment doesn't work due to automatic wrapping of patterns inside non-capturing group HOT 1
- Add Completion Files + Manpage to Source Repository HOT 3
- Multiline fixed string search failing when a newline character is followed by the ^ character HOT 10
- Add printf-like option for custom formatting of filepaths HOT 4
- darcs boringfiles HOT 1
- Memory not freed in ignore crate when ignore flags are enabled
- Include valid values in --help HOT 2
- Turn on PCRE2 automatically with a warning when look-around or backreferences are detected HOT 2
- consider adding an `rg:` prefix all error messages HOT 1
- issue when using double quotes to search in linux HOT 1
- feat(globset): allow custom component separator characters? HOT 3
- [ignore] Add API for adding glob patterns to ignore HOT 4
- shard regexes when there are many and do multiple passes over the haystack HOT 4
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.