Can you please tell me the grep pattern for matching the following filepath:
../any_directoryname/filename.txt
I only know the filename. The any_directoryname keeps on changing.
Thanks in advance,
Regards
John
Try this:
\.\./[^/]+/filename.txt
This assumes only one directory. If it can be more than that, try
\.\./[^\r\n]+/filename.txt
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