How to identify files paths where the 3rd or 5th directory in the path have a capital letter? (in regular expression)

Viewed 26

How do I identify files paths where the 3rd or 5th directory in the path have a capital letter? (in regular expression)

From this list:

C:\Users\user\Documents\Zoom\zoom.txt - match (capital letter in 5th directory)
C:\Users\User\Documents\zoom\zoom.txt - match (capital letter in 3th directory)
C:\Users\User\Documents\Zoom\zoom.txt - match (capital letter in both 3th and 5th directory)
C:\Users\user\Documents\zoom\zoom.txt - don't match

I am not sure how to even start building this regex and would appreciate some guidance, thanks!

0 Answers
Related