Before you start: test every pattern with examples that should match and examples that should fail.
Basic building blocks
These small patterns appear inside many larger solutions.
\d+ # one or more digits\n\w+ # one or more word chars\n^abc$ # exactly abc\n[A-Z]{2} # two uppercase lettersFormat validation
Anchors are common when the entire input must follow one structure.
^\d{5}-\d{3}$ # formatted Brazilian ZIP/CEP\n^\d{2}/\d{2}/\d{4}$ # structural date\n^\(\d{2}\) \d{5}-\d{4}$ # formatted phoneWeb and development examples
URLs, file extensions, and logs are good exercises for groups and alternation.
\.(jpg|png|webp)$ # image extension\n^(INFO|WARN|ERROR)\s+ # log level\nhttps?:// # http/https prefix
How to adapt examples safely
Never copy a pattern without writing values that should match and values that should fail. Small requirement changes can completely change the right Regex.
Next step: test it for real
Use the Playground to experiment with the pattern, then practice in the game with feedback on false positives and false negatives.