Bliverly
Início

Regex Cheatsheet

Access the Swiss Army knife library of ready-to-use validations for quick use.

Common Patterns (Copy and Paste)

  • Valid Email
    /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/g
  • Phone (Brazil)
    /(?:\+?55\s?)?(?:\(?\d{2}\)?\s?)?\d{4,5}-?\d{4}/g
  • URL / Web Link
    /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g
  • CPF (with or without punctuation)
    /([0-9]{3}\.?[0-9]{3}\.?[0-9]{3}\-?[0-9]{2})/g

Quick Cheatsheet

. - Any character (except newline)

\d - Any numeric digit (0-9)

\w - Letter, number, or underscore

\s - White space, tab

^ - Start of the string

$ - End of string

* - Zero or more occurrences

+ - One or more occurrences

? - Optional (Zero or one)

[abc] - Group: 'a', 'b', or 'c'

[^abc] - Negation: anything except 'a', 'b', 'c'

Stop Reinventing the Wheel

Spending 3 hours struggling, searching on Google or racking your brain to write a poorly made `Regex` formula (which ends up letting unwanted punctuation or dashes slip through in an input) is a painful waste of senior developers' time.

The Ultimate Masks

Our Cheatsheet (Quick Reference) stores the most used sacred and shielded codes of the global ecosystem (Perfect web domain URL checkers, CPFs with or without punctuation, etc). Everything is ready. Just copy from our box with one click and paste it into your company's Script.