I have this string:
$str = "35x35";
The regex function works fine in php, returns true:
preg_match('/^\d*(x|X){1}\d*$/',trim($str))
But when I transfer this function to javascript it doesn't work and it returns null:
$str.trim().match('/^\d*(x|X){1}\d*$/');
What's the problem?