Replies: 1 comment 3 replies
-
If I'm understanding you correctly, then the standard way to do this is with shell pipelines: |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I often find myself searching for media file names in the following way:
rg 'cat.*videos . ; rg videos.*cat .
where I'm interested in searching the substringsvideos
andcat
in any order. I might have multiple substrings.Can rg/regex help do that in any way? Otherwise I have to write a wrapper script to do that but my posix/bash/programming is not great. I guess it would be something like this:
./rg-substrings cat videos
where it loops through each argument and appends a.*
that gets added to the resulting regex string for rg. But the harder part is looping through all iterations of the orders of the substring.Beta Was this translation helpful? Give feedback.
All reactions