Cheat Sheet

Regex Cheat Sheet for USPTO TESS Trademark Searching

Julie MacDonell

Sep 4, 2024

AI illustration featuring a magnifying glass focused on a registered trademark symbol

Symbol | Meaning | Example

-------|---------|--------

. | Any single character | /c.t/ matches "cat", "cot", "cut"

| Zero or more of previous character | /col/ matches "cl", "col", "cool"

+ | One or more of previous character | /co+l/ matches "col", "cool", but not "cl"

? | Zero or one of previous character | /colou?r/ matches "color" and "colour"

^ | Start of string | /^dog/ matches "doghouse" but not "hotdog"

$ | End of string | /dog$/ matches "hotdog" but not "doghouse"

[ ] | Character class | /[aeiou]/ matches any vowel

[^ ] | Negated character class | /[^aeiou]/ matches any consonant

( ) | Grouping | /(in|ex)port/ matches "import" and "export"

\| | Alternation | /cat\|dog/ matches "cat" or "dog"

{n} | Exactly n occurrences | /a{3}/ matches "aaa"

{n,} | n or more occurrences | /a{3,}/ matches "aaa", "aaaa", etc.

{n,m} | Between n and m occurrences | /a{2,4}/ matches "aa", "aaa", "aaaa"

\d | Any digit | /\d{3}/ matches any three-digit number

\w | Any word character (letter, number, underscore) | /\w+/ matches any word

\s | Any whitespace character | /\s+/ matches any space, tab, or newline

(?=...) | Positive lookahead | /dog(?=food)/ matches "dog" only if followed by "food"

(?!...) | Negative lookahead | /dog(?!food)/ matches "dog" only if not followed by "food"

Common Trademark Regex Patterns:

1. Phonetic equivalents: /[ck]at/ matches "cat" and "kat"

2. Optional plurals: /child(ren)?/ matches "child" and "children"

3. Common misspellings: /colo(u)?r/ matches "color" and "colour"

4. Number variations: /\d+(st|nd|rd|th)/ matches "1st", "2nd", "3rd", "4th", etc.

Note: In TESS, enclose regex patterns in forward slashes: CM:/pattern/