Skip to content

Instantly share code, notes, and snippets.

@gonaumov
Created February 1, 2020 02:20
Show Gist options
  • Save gonaumov/7d29edd49f4dba6f2f902674181fcd98 to your computer and use it in GitHub Desktop.
Save gonaumov/7d29edd49f4dba6f2f902674181fcd98 to your computer and use it in GitHub Desktop.
/**
* Мисля, че това, което искаш да постигнеш е това:
***/
console.log(/^[\u0410-\u044FA-Z0-9\\'\\/@#\\.\\*:]+$/i.test("test1"));
// true
console.log(/^[\u0410-\u044FA-Z0-9\\'\\/@#\\.\\*:]+$/i.test("кирилица1"));
// true
console.log(/^[\u0410-\u044FA-Z0-9\\'\\/@#\\.\\*:]+$/i.test("111111"));
// true
/**
Работата е там, че това май не е точно това, което ти е нужно.
Ако съм разбрал правилно това, което ти е нужно е
"или само числа, или само букви или специални символи само".
Вземи обясни по-добре и ще ти се помогне, както вече казах.
**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment