79185001

Date: 2024-11-13 13:06:13
Score: 1
Natty:
Report link

A colleague of mine just copied this regex from above in our codebase so I want to make an update here that nowadays browsers do widely support unicode.

var regexp = /^\p{Letter}+$/u;

var val1 = "Normal";
var val2 = "Połącz";
var val3 = "Illegal space char";

console.log(regexp.test(val1), regexp.test(val2), regexp.test(val3));
// ^--- true true false

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Valery