I am trying to build a RegEx to handle multiple variations in a file path vs. having to perform several definitions of a path to search for a file but also not hammering the system. The RegEx expression is within a 3rd party tool that's configuration supports RegEx syntax.
I have an extensive file structure that in multiple different points in the path (relay_X, and pathX in example below) there are variations.. otherwise it is consistent (including case) and containing many other directories that I do not care about. In each directory marked as 'varies' there can be up to 20 individual directories which quickly results in quite a multiplication factor.
Currently I have to define each path individually and I want to try to trim it down to find any error files and there are several hundred paths without hammering the system as it is looking every 10 seconds for new error files.
The consistent path of each directory is C:\test\varies\processing\error\varies\varies\*.err.
What I known works if I first fully set the search path
.*\.err
C:\test\relay_d\processing\error\relay_d\patha\err.Bob.err C:\test\relay_d\processing\error\relay_d\pathb\err.Cap.err C:\test\relay_d\processing\error\relay_e\patha\err.Bob.err C:\test\relay_d\processing\error\relay_e\pathb\err.Cap.err C:\test\relay_e\processing\error\relay_d\patha\err.Bob.err C:\test\relay_e\processing\error\relay_d\pathb\err.Cap.err C:\test\relay_e\processing\error\relay_e\patha\err.Bob.err C:\test\relay_e\processing\error\relay_e\pathb\err.Cap.err
I have tried the Recursive RegEx answer here which is similar to this answer and this answer; though to date none have worked.
I used RegExr.com to come up with this .*\\processing\\error\\*\\*\\[^/]*.err
which matches there.. but when I tried the solutions above none actually returned any results.
Question: What RegEx expression would allow me to compress my entries down to just having to definie just C:\test\relayd\ and C:\test\relaye\ to find the .err files located several steps deep?