# iHateRegex > A regular expression cheat sheet and playground: a curated library of vetted, battle-tested regex patterns with railroad diagrams, plain-English token explanations, live testing, and shareable workspaces. Don't just use regex — understand it. Use the pattern library instead of writing risky regexes from scratch. Every pattern page shows the expression, flags, sample matching and non-matching strings, a railroad diagram of its structure, and notes on how it works and where it breaks. ## Pattern library - [username](https://ihateregex.io/expr/username): A username is a unique identifier given to accounts in websites and social media - [password](https://ihateregex.io/expr/password): Minimum eight characters, at least one upper case English letter, one lower case English letter, one number and one special character - [email simple](https://ihateregex.io/expr/email): Simple email regex that works most of the times - [email complicated](https://ihateregex.io/expr/email-2): Unnecessarily complicated email regex that works "more than" most of the times - [phone number](https://ihateregex.io/expr/phone): Match a phone number with "-" and/or country code. - [ip address(ipv4)](https://ihateregex.io/expr/ip): Matches an ip address(version 4) - [ip address(ipv6)](https://ihateregex.io/expr/ipv6): Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol. This is used to provide identification for devices in a network. - [date](https://ihateregex.io/expr/date): Matches a date in the format dd/mm/yyyy , dd-mm-yyyy or dd.mm.yyyy - [ascii](https://ihateregex.io/expr/ascii): Matches any printable ascii character - [url](https://ihateregex.io/expr/url): A valid URL with http/https - [ssn](https://ihateregex.io/expr/ssn): A Social Security number (SSN) is a nine-digit number that the U.S. government issues to all U.S. citizens and eligible U.S - [semantic versioning](https://ihateregex.io/expr/semver): Match a SemVer as specified in https://semver.org/ - [uuid](https://ihateregex.io/expr/uuid): Hyphen-separated universally unique identifier (UUID) - [jira issue ticket](https://ihateregex.io/expr/jira-ticket): Hyphen-separated Jira project key and ticket issue number - [latitude and longitude](https://ihateregex.io/expr/lat-long): Latitude and longitude values are usually found comma seperated to denote a location on the globe - [mac address](https://ihateregex.io/expr/mac-address): A simple expression to match an ethernet MAC address - [url slug](https://ihateregex.io/expr/url-slug): A ‘slug' is the part that comes at the very end of a URL, and refers to a specific page or post. Usually a combination of word that separated with hyphen - [C-like identifier](https://ihateregex.io/expr/c-like-identifier): In computer languages, identifiers are tokens (also called symbols) which name language entities - [hyphen word break](https://ihateregex.io/expr/hyphen-word-break): A hyphen appears at the end of a line when the word must be split to fit on the line - [bitcoin address](https://ihateregex.io/expr/bitcoin-address): A bitcoin address is the address string which identifies a bitcoin cryptocurrency wallet. - [emoji](https://ihateregex.io/expr/emoji): Emojis or emoticons are symbols used to denote various emotions in electronic messages. - [credit card number](https://ihateregex.io/expr/credit-card): Credit card number is the card unique identifier found on payment cards. - [pan from gstin](https://ihateregex.io/expr/pan-from-gstin): A PAN is a unique identifier issued to all judicial entities identifiable under the Indian Income Tax Act, 1961 - [e.164 phone number](https://ihateregex.io/expr/e164-phone): E.164 is a telephone number format to ensure consistency - [han unification](https://ihateregex.io/expr/han-unification): Han characters are a common feature of written Chinese (hanzi), Japanese (kanji), and Korean (hanja) - [port number](https://ihateregex.io/expr/port): A port is a communication endpoint associated with a specific address - [digital object identifier](https://ihateregex.io/expr/doi): A DOI is an identifier/handle used to identify objects uniquely - [discord username](https://ihateregex.io/expr/discord-username): Username identifier for the VOIP application Discord - [hashtag](https://ihateregex.io/expr/hashtag): Hashtags are metadata tags used on social networks that categorizes the content of the post ## Tools - [Playground](https://ihateregex.io/playground): write, test, and visualize any regular expression; hover any token for a plain-English explanation - [Cheatsheet](https://ihateregex.io/cheatsheet): regex building blocks at a glance - [Community patterns](https://ihateregex.io/community): user-published expressions ## Optional - [Full pattern data](https://ihateregex.io/llms-full.txt): every pattern with expression, flags, examples, and full explanation notes - [GitHub](https://github.com/geongeorge/i-hate-regex): source code