Cuicui logoCuicui - Best all in one React component library
Star Icon869Star Cuicui on GitHub
  • Why another library?

  • Getting Started

  • Contribute

  • Changelog

  • Sponsored by Armony Logo

    Armony Logo

    A Single Subscription. Unlimited AI Power.

    By Damien Schneider

    View my GitHub
    cuicui.day/snippets/regex

    Hexadecimal Color

    colorhexadecimal
    ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$
    
    
    -> Usage:
    #FFF1 ✗
    #FFF ✓
    #FFF000 ✓
    
    ...

    IPv4

    ipv4networking
    ^((25[0-5]|2[0-4]\d|1\d{2}|\d{1,2})\.){3}(25[0-5]|2[0-4]\d|1\d{2}|\d{1,2})$
    
    
    -> Usage:
    123.300.0.101 ✗
    127.0.0.1 ✓
    192.168.0.1 ✓
    
    ...

    Unintentional Duplication

    duplication
    \b(\w+)\s+\1\b
    
    
    -> Usage:
    I need to finish this task ✗
    I need to to finish this task ✓
    
    ...

    Whitespace Trimmer

    trim
    ^\s+|\s+$
    
    
    -> Usage:
    (don't account for the quotation marks, it just to visualize whitespace)
    "Hello World" ✗
    " Hello World" ✓
    "Hello World " ✓
    " Hello World " ✓
    
    ...

    Email Address

    email
    ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
    
    -> Usage:
    example.name@domain.com.ru ✓
    name.surname@gmail.com ✓
    
    ...

    Strong Password

    password
    ^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{12,}$
    
    -> Usage:
    longpassword ✗
    longpassw0rd ✗
    longp@ssw0rd ✗
    Longp@ssw0rd ✓
    
    ...
    Star Icon869Star Cuicui on GitHub