I'm looking to match the following: xxxxxApplexxxxxOrangexxxxx
I need a regex expression which will match this string with either Apple
+ Orange
or Orange
+ Apple
AND will only match if both words are found in the string.
Update: I liked @lagripe's answer (?=.*?(Apple))(?>.*?(Orange)
as that one could be used easily within in my program. I'll be generating the regex expression programmatically based on N number of words. Thanks