Atomic Regex: The Rules

Rule 1: You can't have a rule that's too long, or it might just get lost in the void

Keep your regex patterns short and sweet, or risk losing all sense of reason.

Rule 2: Don't be a greedy regex

Be careful not to consume all the input, or you might just end up with an empty plate.

Rule 3: Capture groups are like party guests: they can be invited, but don't overstay their welcome

Too many capture groups can lead to an unwieldy regex that's hard to manage.

Back to Rules Back to Top Level