I want to perform a search on all of the files in the /app/libraries and /app/views folders, but I only want to search within files starting with App in the /app/models folder.
If I use /app/libraries, /app/views, /app/models/App* it gives me:
/app/models/App*:
ERROR: Unable to open file
0 matches
If I use /app/libraries, /app/views, /app/models, App* it only gives me files starting with App in all of the folders.
I've tried getting rid of the leading slash /app/libraries, /app/views, app/models/App* as suggested by this answer, but I get this:
Searching 0 files for "search string" (regex, case sensitive)
0 matches
The point here is that you have been using wildcard pattern while you needed a regex pattern.
To match any amount of any chars in wildcard patterns, an asterisk is used, but in regex patterns, you may use either .* (any 0+ chars other than line break chars) or - if you need to only match App as part of the file name (and thus, no more / are allowed) - you may use [^/]* (zero or more chars other than /.
So, use either
/app/models/App.*
or
/app/models/App[^/]*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With