I'm trying to match (look for) two words in a string which is as follows:
Mac OS X/10.11.5 (15F34); ExchangeWebServices/6.0 (243);
I want to match (true) if we see "Mac
" AND "ExchangeWebServices
" but the characters between the two words would be unknown/random. Can someone help me with the regex syntax?
Thanks!
This will match exactly the words "Mac" and "ExchangeWebServices" with anything else between them:
\bMac\b.*\bExchangeWebServices\b
Regex 101 Example: https://regex101.com/r/sK2qG1/4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With