I am trying to use an api provided by another website. There is a method searchReports to which I can pass a word or a regular expression(php). I want to pass a regular expression for matching anything other than these words. China,Russia,North Korea . I tried some but nothing worked
^(?!(country1|country2|country3)$).*$ finally worked. Thanks.
Maybe this one:
/^((?!(^china$)|(^russia$)|(^north korea$)).)*$/i
The "i" at the end stands for "ignore-case". Does php deal ok with it?
^(?!(country1|country2|country3)$).*$ finally worked. Thanks.
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