news.volyx.in

Show HN: Regex Cheatsheet (ihateregex.io)

499 points by geongeorgek · 2446 days ago · 129 comments on HN

Article summary

The article presents a regex cheatsheet that provides a library of commonly used regular expressions, along with explanations and visual representations to help users understand and test their patterns. The cheatsheet covers various topics, including username, password, email, phone number, and IP address validation. It aims to help users understand and work with regular expressions more effectively. The tool also allows for editing and instant validation of expressions.

Main themes

  • regex cheatsheet
  • regular expression understanding
  • email validation
  • lookbehinds and lookaheads
  • automata and variable-length asserts
  • privately owned TLDs
  • programming language alternatives to regex

What commenters say

  • The visual representation of regular expressions is helpful in understanding how they work.
  • Regular expressions can be inefficient and prone to errors if not properly understood.
  • Some commenters argue that regex should not be used for email address validation due to its complexity and potential for errors.
  • Others suggest that lookbehinds in regular expressions can be problematic and should be avoided in certain situations.
  • The use of automata can make variable-length backward asserts in regular expressions more manageable.
  • Privately owned TLDs can make email address validation more complicated.
  • Some users prefer to use pure programming language solutions instead of regular expressions for certain tasks.
  • The article's regex cheatsheet is intended for beginners, but more content is planned for the future.