converted endpoint matching to returning regex matches insead of true/false