Coder's spot

Coding. And more.

Sunday, November 16, 2014

Regex to enforce 3 characters

To enforce three alphabet characters anywhere,
/(.*[a-z]){3}/i
should be sufficient.
Credits: Andrew Cheong
Posted by Rohan at 11:21 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2022 (1)
    • ►  November (1)
  • ►  2020 (2)
    • ►  June (1)
    • ►  April (1)
  • ►  2018 (16)
    • ►  December (2)
    • ►  May (1)
    • ►  March (13)
  • ►  2016 (18)
    • ►  October (1)
    • ►  August (1)
    • ►  June (1)
    • ►  May (4)
    • ►  April (4)
    • ►  March (7)
  • ▼  2014 (6)
    • ▼  November (6)
      • New vs. Override
      • Inheritance from multiple interfaces with the same...
      • In HTML, the table styles cellpadding and cellspac...
      • Regex to enforce 3 characters
      • Read connection string from web.config
      • SQL Server: Difference between varchar and nvarcha...
Simple theme. Powered by Blogger.