Search files for text matching format of a Unix directory
- by BrandonKowalski
I am attempting to search through all the files in a directory for text matching the pattern of any arbitrary directory. The output of this I hope to use to make a list of all directories referenced in the files (this part I think I can figure out on my own).
I have looked at various regex resources and made my own expression that seems to work in the browser based tool but not with grep in the command line.
/\w+[(/\w+)]+
My understanding so far is the above expression will look for the beginning / of a directory then look for an indeterminate number of characters before looking for a repeating block of the same thing.
Any guidance would be greatly appreciated.