Skip to content

Search with Regex within a specific folder #536

Answered by cboxdoerfer
joeldebruijn asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, the problem is with the space between the path and regex query. In regex mode, spaces are treated literally and not as a logical AND. So you are basically searching for files which start with "Retail", followed by a space, then eight digits, and so on.

So what you want to do instead is:

If you want to search within a subfolders of /home/user/folderX/folderY:

1 Disable regex mode
2. Disable search in path mode
3. Use the following query: path:/home/user/folderX/folderY regex:"\d{8} - \d{6}"

or

If you want to search only within /home/user/folderX/folderY:

  1. Keep regex mode enabled
  2. Keep search in path mode enabled
  3. Use the following query: /home/user/folderX/folderY/\d{8} - \d{6}

There ar…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@joeldebruijn
Comment options

Answer selected by joeldebruijn
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants