About 944,000 results
Open links in new tab
  1. javascript regex (username validation) - Stack Overflow

    Mar 9, 2012 · Adding digits for your username check is straightforward: var usernameRegex = /^[a-zA-Z0-9]+$/; Note: There are many ways to write regular expressions. I've chosen to …

  2. JavaScriptUsername Validation using Regex - GeeksforGeeks

    Jan 16, 2025 · To validate a form in JavaScript, you can use Regular Expressions (RegExp) to ensure that user input follows the correct format. In this article, we'll explore how to validate …

  3. Username and Password Validation Using Regex - DEV Community

    Jun 24, 2023 · The JavaScript RegExp class has a very handy method called test() that can be used to test strings against a specified regex statement. For instance, For instance, const …

  4. JavaScript RegExp Reference - W3Schools

    A regular expression is a pattern of characters. The pattern is used for searching and replacing characters in strings. The RegExp Object is a regular expression with added Properties and …

  5. Regular Expressions (RegEx) in JavaScript – A Handbook for …

    Feb 27, 2024 · How to Use Regular Expressions in JavaScript. You can use regular expressions with various methods available for both the RegExp and String objects in JavaScript. Some …

  6. JavaScript & PHP Regex Validation Username, Email, Password

    validate usernames, emails, dates, passwords, URLs, and mobile numbers using JavaScript and PHP Regex. Try the live demo and get validation code

  7. javascript - Username Validation RegExp - Code Review Stack …

    May 15, 2023 · From there, a username can contain either: 1 or more letters, followed by 0 or more numbers at the end of the string. OR. 2 or more numbers at the end of the string. Which …

  8. JavaScript - How to Validate Form Using Regular Expression?

    Dec 3, 2024 · To validate a form in JavaScript, you can use Regular Expressions (RegExp) to ensure that user input follows the correct format. In this article, we'll explore how to validate …

  9. regex101: Username Validation

    Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.

  10. How to create a username regular expression with JavaScript?

    Sep 19, 2020 · const regex = /^(?![A-Za-z]\d?$)[a-zA-Z]+\d*$/; [ "tt", "tt2", "test", "a11", "t2", "t", "1", "t1t" ].forEach(s => console.log(`${s} ==> ${regex.test(s)}`));

  11. Some results have been removed