How to insert correctly variables phone
and phone_digs
in Match so that it is like this:
s.match ('/' '+ Phone +' [0-9] {5} '+ phone_digs +' / g ')
This way, unfortunately, does not work.
Answer 1, Authority 100%
Create a new site Regexp
var pattern = new regExp (Phone + '[0-9] {5}' + Phone_Digs, G);
Console.log (S.Match (Pattern));