JavaScript
var regex = /......../;
regex.test(string);
c#
Regex reXXXX = new Regex(@"XXXXX");
reXXXX.isMatch(string)