1
Support and Feedback / Re: File find
« on: September 15, 2015, 07:42:39 »
I've looked at the Wikipedia article and have a sense of how RegEx works. Would not the second expression you gave:
Code: [Select]
(.*)(word1|word2)(.*)(word2|word1)(.*)
select the files I am looking for (files that have both word1 and word2 in any order in their filenames) but also select files with two occurrences of word1 and no occurrences of word2, or two occurrences of word2 and no occurrences of word1?
I am thinking ((.*)(word1)(.*)(word2)(.*))|((.*)(word2)(.*)(word1)(.*)) would give me just those files that have both word1 and word2 in any order in their filenames.
I am ready to be corrected, as I am obviously unschooled in RegEx.
-- Arthur
Code: [Select]
(.*)(word1|word2)(.*)(word2|word1)(.*)
select the files I am looking for (files that have both word1 and word2 in any order in their filenames) but also select files with two occurrences of word1 and no occurrences of word2, or two occurrences of word2 and no occurrences of word1?
I am thinking ((.*)(word1)(.*)(word2)(.*))|((.*)(word2)(.*)(word1)(.*)) would give me just those files that have both word1 and word2 in any order in their filenames.
I am ready to be corrected, as I am obviously unschooled in RegEx.
-- Arthur