Below is my code
/config\/info\/newplan/.test(string)
which will return true when find /config/info/newplan/ in string.
However, I would like to test different condition in the same time like below
/config\/info\/newplan/.test(string) || /config\/info\/oldplan/.test(string) || /config\/info\/specplan/.test(string)
which will return true if the string end up with either "newplan" or "oldplan" or "specplan"
My question is how to make a better code and not write "/config/\info/\xxxx\ so many times?