I'd like to whitelist domains and I have this list as
(domain1.com|domain2.com)
However, it will still match to
ci.domain1.com
https://regex101.com/r/A2IOJE/1/
I'm writing the code in node.js
Here's the code
new RegExp('(domain1.com|domain2.com)', 'igm').test('ci.domain1.com');