Below are some sample regexes:


Regex - (?<Drive>[a-zA-Z])(:)(\\)Data(\\)Job-Docs(\\)Jobs(\\)(\w*)(\W)(\w)*(\\)(?<ContractNo>\w+)(\\)XXClickHome(\\).*

Would match to E:\Data\Job-Docs\Jobs\ 33101-33200\33173\XXClickHome\


if there was a job with Jobnumber 33173


fkidOther must be the relevant document category Id (see tblDocCategories.idDocumentCategory)

sgValue must be either L, P or C 



Regexes can be tested here:

http://regexhero.net/



More examples of Regexes:

(\\\\)Server Name(\\)Jobs(\\)(\w[\w ]*)(\\)(\w[\w &^#@%$()*+=!'-{}<>,.`~|?[]*)\s+(?<ContractNo>\w+)(\\)photos(\\).*                                                example folder: \\Server Name\Jobs\B\Booth 30694\PHOTOS\cabinets 001.jpg

(\\\\)Server Name(\\)Jobs(\\)(\w[\w ]*)(\\)(\w[\w &^#@%$()*+=!'-{}<>,.`~|?[]*)\s+(?<ContractNo>\w+)(\\)FWDs, Layouts & Components(\\).*

(\\\\)Server Name(\\)Jobs(\\)(\w[\w ]*)(\\)(\w[\w &^#@%$()*+=!'-{}<>,.`~|?[]*)\s+(?<ContractNo>\w+)(\\)Maintenance(\\).*

(\\\\)Server Name(\\)Jobs(\\)(\w[\w ]*)(\\)(\w[\w &^#@%$()*+=!'-{}<>,.`~|?[]*)\s+(?<ContractNo>\w+)(\\)Supervisor(\\).*

(\\\\)Server Name(\\)Jobs(\\)(\w[\w ]*)(\\)(\w[\w &^#@%$()*+=!'-{}<>,.`~|?[]*)\s+(?<ContractNo>\w+)(\\)Variations - Signed(\\).*

(\\\\)Server Name(\\)Jobs(\\)(\w[\w ]*)(\\)(\w[\w &^#@%$()*+=!'-{}<>,.`~|?[]*)\s+(?<ContractNo>\w+)(\\)Shire - Approved Docs(\\).*

If excluding a specific folder, such as 'Superceded', then add at the end of the regex:
(\\\\)Server Name(\\)Jobs(\\)(\w[\w ]*)(\\)(\w[\w &^#@%$()*+=!'-{}<>,.`~|?[]*)\s+(?<ContractNo>\w+)(\\)01 Drafting PDFs(\\)((?!Superceded).)*$