I want to check an extension of a file and only process ‘doc’, ‘docx’, and ‘pdf’ files. I am using regex in IF statement but it does not work. Seems like it is full match.
If item matches regexp (doc|pdf)
If item matches regexp ([^\s]+(.(?i)(doc|pdf))$)
Please kindly advise.