# iHateRegex — full pattern library > Curated, battle-tested regular expressions with examples and explanations. > Each pattern below includes the expression, flags, sample strings, and notes. > Interactive versions with railroad diagrams: https://ihateregex.io ## username A username is a unique identifier given to accounts in websites and social media - Pattern: `/^[a-z0-9_-]{3,15}$/gm` - Page: https://ihateregex.io/expr/username - Tags: name, slug - Matches: `lorem`, `ipsum`, `gr3at`, `abcd`, `abcde`, `johnny` - Does not match: `a`, `ab`, `john doe`, `abcdefghijklmnopqrst` Alphanumeric string that may include **\_ and -** having a length of **3 to 16** characters. --- ## password Minimum eight characters, at least one upper case English letter, one lower case English letter, one number and one special character - Pattern: `/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{8,}$/gm` - Page: https://ihateregex.io/expr/password - Tags: password, secret, key - Matches: `gr3at@3wdsG` - Does not match: `lorem`, `ipsum`, `a`, `ab`, `abc`, `abcd`, `abcde`, `john doe`, `johnny`, `abcdefghijklmnopqrst` In this case a password may contain: - `(?=.*?[A-Z])` : At least one upper case English letter - `(?=.*?[a-z])` : At least one lower case English letter - `(?=.*?[0-9])` : At least one digit - `(?=.*?[#?!@$ %^&*-])` : At least one special character or space - `.{8,}` : Minimum eight in length The lookahead ( `(?=.*?[A-Z])` ) is used to check if after some characters if there is an occurance of an upper case letter. Similarly all the other lookaheads(lower, numbers, etc) are checked to complete the whole regex. --- ## email simple Simple email regex that works most of the times - Pattern: `/[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+/gm` - Page: https://ihateregex.io/expr/email - Tags: email, mail, gmail - Matches: `geon@ihateregex.io`, `test@gmail.com mail@test.org`, `mail@testing.com`, `theproblem@test@gmail.com`, `mail with@space.com` - Does not match: `hello@`, `@test`, `email@gmail` `[^@ \\t\\r\\n]` matches for anything other than **@, space, tab, new lines** repetitions of a non-whitespace character. --- ## email complicated Unnecessarily complicated email regex that works "more than" most of the times - Pattern: `/(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/gm` - Page: https://ihateregex.io/expr/email-2 - Tags: email, mail, gmail - Matches: `geon@ihateregex.io`, `test@gmail.com mail@test.org`, `mail@testing.com`, `theproblem@test@gmail.com` - Does not match: `hello@`, `@test`, `email@gmail` Strict validation of email. Although it's up for debate often, It's better to use simpler expressions whenever possible. Check out a shorter - [email regex](/expr/email) --- ## phone number Match a phone number with "-" and/or country code. - Pattern: `/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/gmi` - Page: https://ihateregex.io/expr/phone - Tags: phone, mobile, number - Matches: `+919367788755`, `8989829304`, `+16308520397`, `786-307-3615` - Does not match: `789`, `123765`, `1-1-1`, `+982` This is a generalized expression which works most of the time. There are too many variables to make this work around the world. Do try with the phone numbers in your country before using. --- ## ip address(ipv4) Matches an ip address(version 4) - Pattern: `/(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}/gm` - Page: https://ihateregex.io/expr/ip - Tags: ip, ipv4 - Matches: `192.168.1.1`, `127.0.0.1`, `0.0.0.0`, `255.255.255.255`, `1.2.3.4` - Does not match: `256.256.256.256`, `999.999.999.999`, `1.2.3` **Internet Protocol (ip)** addresses are the numerical identifiers of each device connected to a computer network that uses Internet Protocol for communication. This 32 bit address scheme is the first version of ip addresses. The addresses are separated by period `(.)`. ip addresses are of the range `0.0.0.0` - `255.255.255.255` This expression will match a given string for an ip address and also considers the range. --- ## ip address(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. - Pattern: `/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/gm` - Page: https://ihateregex.io/expr/ipv6 - Tags: ip, ipv6 - Matches: `2001:0db8:85a3:0000:0000:8a2e:0370:7334`, `FE80:0000:0000:0000:0202:B3FF:FE1E:8329` - Does not match: `192.168.1.1`, `test:test:test:test:test:test:test:test` It is a 128 bit alphanumeric address separated by colon `(:)`. It can even contain hexadecimal. --- ## date Matches a date in the format dd/mm/yyyy , dd-mm-yyyy or dd.mm.yyyy - Pattern: `/(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[13-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})/gm` - Page: https://ihateregex.io/expr/date - Tags: date, today, dd/mm/yyyy, day - Matches: `01/01/2000`, `31/01/2000`, `01-1-2000`, `1.1.2019` - Does not match: `32/01/2000` This expression can be used to find or validate a date field and the most accepted form of date can have DD-MM-YYYY format with the seperators: `-` , `/` and `.` --- ## ascii Matches any printable ascii character - Pattern: `/[ -~]/gm` - Page: https://ihateregex.io/expr/ascii - Tags: ascii, unicode - Matches: `lor難em`, `ipsum`, `a - = ? / ~`, `ab`, `ഇത് മലയാളം`, `Christmas` - Does not match: `說上難車中防水回大石在該是並`, `難` The regular expression represents **all printable ASCII characters**. ASCII code is the numerical representation of all the characters and the ASCII table extends from char `NUL`(Null) to `DEL`. The printable characters extend from `CODE 32 (SPACE)` to `CODE 126 (TILDE[~])`. --- ## url A valid URL with http/https - Pattern: `/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_\+.~#?&\/\/=]*)/gm` - Page: https://ihateregex.io/expr/url - Tags: url, http, https, link - Matches: `https://github.com/geongeorge/i-hate-regex`, `https://www.facebook.com/`, `https://www.google.com/`, `https://xkcd.com/2293/`, `http://www.example.com/` - Does not match: `abcdef`, `www.whatever.com`, `https://this-shouldn't.match@example.com` This regex validates a url which should include **http** or **https** --- ## 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 - Pattern: `/^(?!0{3})(?!6{3})[0-8]\d{2}-(?!0{2})\d{2}-(?!0{4})\d{4}$/gm` - Page: https://ihateregex.io/expr/ssn - Tags: ssn, number, id - Matches: `123-45-6789`, `333-22-4444` - Does not match: `123 45 6789`, `aaa-bbb-cccc`, `900-58-4564`, `999-58-4564`, `000-45-5454` This expression can be used to find or validate a hyphen-separated Social Security Number (SSN) in the format **NNN-NN-NNNN**. An SSN cannot: - Contain all zeroes in any specific group (e.g 000-##-####, ###-00-####, or ###-##-0000) - Begin with 666. - Begin with any value from 900-999. --- ## semantic versioning Match a SemVer as specified in https://semver.org/ - Pattern: `/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/gm` - Page: https://ihateregex.io/expr/semver - Tags: semver, version, semantic - Matches: `0.0.4`, `1.2.3`, `10.20.30`, `1.1.2-prerelease+meta`, `1.1.2+meta`, `1.0.0-alpha`, `1.0.0-alpha.beta`, `1.0.0-alpha.1`, `1.0.0-alpha.0valid`, `1.0.0-rc.1+build.1`, `1.2.3-beta`, `10.2.3-DEV-SNAPSHOT`, `1.2.3-SNAPSHOT-123`, `1.0.0`, `2.0.0+build.1848`, `2.0.1-alpha.1227`, `1.0.0-alpha+beta`, `1.2.3----RC-SNAPSHOT.12.9.1--.12+788`, `1.2.3----R-S.12.9.1--.12+meta` - Does not match: `1`, `1.2`, `01.1.1`, `9.8.7-whatever+meta+meta`, `1.2.3.DEV`, `1.2.3-0123`, `1.0.0-alpha_beta`, `1.2-SNAPSHOT`, `1.2.31.2.3----RC-SNAPSHOT.12.09.1--..12+788` Semantic Versioning is a versioning system that has been adapted to bring sanity to the management of rapidly moving software release targets. This expression can be used to find or validate a semantic version numbers. The basic expression has 3 numbers which represent _Major Version_, _Minor Version_ and _Patches_. Pre-release metadata is represented by appending a `hyphen(-)` and the name. --- ## uuid Hyphen-separated universally unique identifier (UUID) - Pattern: `/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gm` - Page: https://ihateregex.io/expr/uuid - Tags: uuid, guid, id - Matches: `123e4567-e89b-12d3-a456-426655440000`, `c73bcdcc-2669-4bf6-81d3-e4ae73fb11fd`, `C73BCDCC-2669-4Bf6-81d3-E4AE73FB11FD` - Does not match: `c73bcdcc-2669-4bf6-81d3-e4an73fb11fd`, `c73bcdcc26694bf681d3e4ae73fb11fd`, `definitely-not-a-uuid` This expression can be used to find or validate a UUID. UUIDs are often used to uniquely identify information in computer systems. A UUID is a 128-bit number represented, textually, in 16 octets as 32 hexadecimal (base-16) digits. These 32 digits are displayed in 5 groups separated by hyphens, in the form 8-4-4-4-12, for a total of 36 characters. You may edit the regex to your liking for removing hyphens. --- ## jira issue ticket Hyphen-separated Jira project key and ticket issue number - Pattern: `/[A-Z]{2,}-\d+/gm` - Page: https://ihateregex.io/expr/jira-ticket - Tags: jira, software - Matches: `DAT-123`, `AB-333`, `PROJECT-6` - Does not match: `A-333`, `aka-48`, `TST 000` JIRA is a tool developed for bug tracking, issue tracking, and project management and it provides one integrated solution for ticketing, tracking and notifications for both internal and external customers. This expression can be used to find or validate mentation of Jira issue ticket number. --- ## latitude and longitude Latitude and longitude values are usually found comma seperated to denote a location on the globe - Pattern: `/^((\-?|\+?)?\d+(\.\d+)?),\s*((\-?|\+?)?\d+(\.\d+)?)$/gm` - Page: https://ihateregex.io/expr/lat-long - Tags: location, address - Matches: `+90.0, -127.554334`, `45, 180`, `-90.000, -180.0`, `20,80`, `47.1231231, 179.99999999`, `045, 180` - Does not match: `-90., -180.` This would work for any comma-separated values that can optionally have + or - as prefix. --- ## mac address A simple expression to match an ethernet MAC address - Pattern: `/^[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}$/gm` - Page: https://ihateregex.io/expr/mac-address - Tags: address - Matches: `01:02:03:04:ab:cd` - Does not match: `definitely:not:a:mac`, `01-02-03-04-ab-cd` A media access control address is a unique identifier assigned to a network interface controller for use as a network address within a network. The expression is a 6 byte hexadecimal which is separated by `colon (:)` or a `dash (-)`. --- ## 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 - Pattern: `/^[a-z0-9]+(?:-[a-z0-9]+)*$/gm` - Page: https://ihateregex.io/expr/url-slug - Tags: slug, url, link - Matches: `best-way`, `best-d4y`, `my-1ife`, `a` - Does not match: `@t-the-sky`, `at-the--sky`, `-`, `fly-` This expression can be used to validate an url slug with only lowercase alphabet or numbers on each word. For example, in `https://github.com/geongeorge/i-hate-regex` , `i-hate-regex` is the slug. --- ## C-like identifier In computer languages, identifiers are tokens (also called symbols) which name language entities - Pattern: `/^[a-zA-Z_][0-9a-zA-Z_]*$/gm` - Page: https://ihateregex.io/expr/c-like-identifier - Tags: c, identifier - Matches: `abc123`, `PascalCase`, `camelCase`, `snake_case`, `_test`, `_` - Does not match: `123abc` The identifiers are the names given to variables, structures, functions etc in programming languages like C. An identifier can have **alphabets, numbers, and underscore (_)**. Identifiers cannot start with numbers. **Note:** Keywords cannot be used as an identifier --- ## hyphen word break A hyphen appears at the end of a line when the word must be split to fit on the line - Pattern: `/[a-zA-Z][\-]$[\n][a-zA-Z]/gm` - Page: https://ihateregex.io/expr/hyphen-word-break - Tags: hyphen, word_break - Matches: — - Does not match: `It illustrates not only the impor-`, `tance of the golden rule for asking questions—Ask what you want`, `to know, not something else—but also, more important, the ambi-`, `guities of language and the powerful force of context in interpret-`, `ing the meaning of questions and answers. Our colleague had` A hyphen word break is when a word is broken into 2 using a hyphen (`-`) to be continued in the next line This is especially useful in scraping data when you wanna join hyphen seperated words --- ## bitcoin address A bitcoin address is the address string which identifies a bitcoin cryptocurrency wallet. - Pattern: `/^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$/gm` - Page: https://ihateregex.io/expr/bitcoin-address - Tags: crypto, address - Matches: `1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY`, `16ftSEQ4ctQFDtVZiUBusQUjRrGhM3JYwe`, `1EBHA1ckUWzNKN7BMfDwGTx6GKEbADUozX`, `bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq` - Does not match: `loremipsum`, `0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae` The unique identifier which serves as the virtual location of cryptocurrency. The Bitcoin address is an identifier of **26-35** alphanumeric characters, beginning with the number `1`, `3` or `bc1`. `0, O, I, l` are removed to avoid visual ambiguity. There are currently three address formats in use: 1.**P2PKH** which begin with the number `1` 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2 2.**P2SH** type starting with the number `3` 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy 3.**Bech32** type starting with `bc1` bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq The length of the bitcoin address is validated. After which, it is checked for digits, lowercase or uppercase characters. The prefix is also checked later. It must also be made sure to pass the text which contains only the bitcoin address (`^` and `$` makes sure of this). --- ## emoji Emojis or emoticons are symbols used to denote various emotions in electronic messages. - Pattern: `/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/gm` - Page: https://ihateregex.io/expr/emoji - Tags: emoji, emoticon, smiley - Matches: `Emojis are amazing 😍`, `⁣☀ ☁`, ` ☁`, ` 🐬`, `🌊🌊⛵🌊🌊🌊🌊⁣🌊`, ` | 🐠`, ` | 🐟`, ` 🐳 | `, ` ⚓` - Does not match: ``, ` |` Unicode standards published a list of all [emoji data](https://www.unicode.org/Public/emoji/12.1/emoji-data.txt) > In 2015, Oxford Dictionaries named the Face with Tears of Joy emoji (😂) the **Word of the Year** --- ## credit card number Credit card number is the card unique identifier found on payment cards. - Pattern: `/(^4[0-9]{12}(?:[0-9]{3})?$)|(^(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$)|(3[47][0-9]{13})|(^3(?:0[0-5]|[68][0-9])[0-9]{11}$)|(^6(?:011|5[0-9]{2})[0-9]{12}$)|(^(?:2131|1800|35\d{3})\d{11}$)/gm` - Page: https://ihateregex.io/expr/credit-card - Tags: credit card, payment card, Visa, MasterCard, American Express, Diners Club, Discover, JCB - Matches: `4569403961014710`, `5191914942157165`, `370341378581367`, `38520000023237`, `6011000000000000`, `3566002020360505` - Does not match: `1234566660000222` This expression can be used to detect or verify credit card numbers: - Visa *(group #1)* - MasterCard *(group #2)* - American Express *(group #3)* - Diners Club *(group #4)* - Discover *(group #5)* - JCB *(group #6)* **Disclaimer:** If you want to use regex just to know the card brand for visual use (display Visa logo or label), that is fine. But if your code logic depends on it, then don't use regex, and use a 3rd party plugin/library instead (read more about it [here](https://stackoverflow.com/questions/9315647/regex-credit-card-number-tests/55019607#55019607)). --- ## pan from gstin A PAN is a unique identifier issued to all judicial entities identifiable under the Indian Income Tax Act, 1961 - Pattern: `/^([0][1-9]|[1-2][0-9]|[3][0-5])([a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1})([1-9a-zA-Z]{1}[zZ]{1}[0-9a-zA-Z]{1})+$/igm` - Page: https://ihateregex.io/expr/pan-from-gstin - Tags: PAN FROM GSTIN, GSTIN, GST, INDIAN GSTIN, INDIAN PAN - Matches: `22ABCDE1234F1Z5`, `11GHIJK1234L1Z5`, `33PQRST5678L1Z5`, `34UVWXY5678L1Z5`, `35PQRST5678L1Z5`, `22ABCDE1234F1Z5` - Does not match: — This regex matches PAN number from GSTIN number for validation of PAN number embedded in GSTIN A permanent account number (PAN) is a ten-character alphanumeric identifier, issued in the form of a laminated "PAN card", by the Indian Income Tax Department. This regex can extract the match number from a Goods and Services Taxpayer Identification Number (GSTIN). --- ## e.164 phone number E.164 is a telephone number format to ensure consistency - Pattern: `/^\+[1-9]\d{1,14}$/igm` - Page: https://ihateregex.io/expr/e164-phone - Tags: phone, e.164, number, telephone - Matches: `+919367788755`, `+16308520397`, `+14155552671`, `+551155256325` - Does not match: `8989829304`, `786-307-3615` E.164 numbers are formatted as: `[+] [country code] [subscriber number including area code]` And can have a maximum of fifteen digits. --- ## han unification Han characters are a common feature of written Chinese (hanzi), Japanese (kanji), and Korean (hanja) - Pattern: `/^[\u4E00-\u9FFF\u3400-\u4DBF\u20000-\u2A6DF\u2A700-\u2B73F\u2B740-\u2B81F\u2B820-\u2CEAF\u2CEB0-\u2EBEF\u30000-\u3134F\uF900-\uFAFF\u2E80-\u2EFF\u31C0-\u31EF\u3000-\u303F\u2FF0-\u2FFF\u3300-\u33FF\uFE30-\uFE4F\uF900-\uFAFF\u2F800-\u2FA1F\u3200-\u32FF\u1F200-\u1F2FF\u2F00-\u2FDF]+$/gm` - Page: https://ihateregex.io/expr/han-unification - Tags: hans, chinese, japanese, korean - Matches: `今`, `具`, `雇` - Does not match: — Read [Han Unification](https://en.wikipedia.org/wiki/Han_unification#Unicode_ranges) --- ## port number A port is a communication endpoint associated with a specific address - Pattern: `/^((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{0,5})|([0-9]{1,4}))$/gm` - Page: https://ihateregex.io/expr/port - Tags: port, ip, network - Matches: `8080`, `3000`, `65535` - Does not match: `65536` A port is a 16-bit unsigned integer ranging from `0` to `65535`. The regex pattern tries to figure out if the input string falls under the given range. ### A Better approach Although this works, a far better(and simpler) approach would be this: 1. Take the input string and convert it into a number 2. If possible see if it falls in the range `0-65535` 3. If both the conditions succeed, then it is a valid port number --- ## digital object identifier A DOI is an identifier/handle used to identify objects uniquely - Pattern: `/^(10\.\d{4,5}\/[\S]+[^;,.\s])$/gmi` - Page: https://ihateregex.io/expr/doi - Tags: doi, document, identifier, journal - Matches: `10.1000/123456`, `10.1038/issn.1476-4687`, `10.1111/dome.12082`, `10.1111/josi.12122` - Does not match: — Read [DOI](https://www.doi.org/) --- ## discord username Username identifier for the VOIP application Discord - Pattern: `/^.{3,32}#[0-9]{4}$/gmi` - Page: https://ihateregex.io/expr/discord-username - Tags: discord, gaming, username - Matches: `Disコルド#0001`, `KiBender#1234`, `SkankHunt42#2134` - Does not match: — The service Discord allows to have a 4 digit tag along with a user name. --- ## hashtag Hashtags are metadata tags used on social networks that categorizes the content of the post - Pattern: `/^#[^ !@#$%^&*(),.?":{}|<>]*$/gmi` - Page: https://ihateregex.io/expr/hashtag - Tags: hashtag, twitter, social - Matches: `#Hello`, `#Photography_Daily`, `#justice4me` - Does not match: `#Photography Daily` Used extensively in social media apps like Twitter and Instagram