Pattern-based, not database-backed
This is the Filter tool with a regex default tuned for the shape of city names: capitalized-first-letter words, optionally joined by spaces or hyphens. No list of known cities is shipped with this tool - `Unicorn` would also pass if it were on a line by itself.
Use one-item-per-line input. The filter keeps whole lines that contain a match to the pattern. `New York, NY 10001` on one line would be kept because `New York` matches, but the whole line (including the zip code) is emitted.
For strict city matching, replace the default pattern with an alternation of your known cities: `^(Paris|London|Tokyo|New York)$`. For country-aware matching, combine with external data - this tool has no built-in geo knowledge.
How to use find cities in a list
- 1Put one item per line into the input panel
- 2Default pattern matches capitalized-word sequences
- 3Swap pattern for an exact city list if you have one: `^(Paris|London|Tokyo)$`
- 4Toggle Invert to drop city-shaped lines instead
- 5Whole-word toggle has no effect in Regex mode
Keyboard shortcuts
Drive ListShift without touching the mouse.
What this tool actually does
Regex filter, pre-tuned for capitalized-proper-noun shapes.
Default pattern: capitalized-word chains
Single words (`Paris`), space-separated (`New York`), or hyphen-joined (`Rio-de-Janeiro`) all match.
Not a city database
Any capitalized proper noun shape matches - including personal names. For authoritative city-only filtering, replace the pattern with an alternation of exact city names.
Case-sensitive by default
Lowercased words like `paris` do NOT match. This is intentional - city names are conventionally capitalized, so requiring capitalization filters out noise like generic nouns.
Keeps whole lines
A line like `Contact: Jane Smith, New York, NY` would be kept (matches `Jane`, `Smith`, `New`, `York`). To extract just the city, use Replace with a capture group.
Invert to drop capitalized lines
Toggle Invert to keep only lines WITHOUT a capitalized-word pattern - useful for stripping names/places from free-text.
Common use cases
Concrete scenarios where a capitalized-proper-noun filter earns its keep.
Address and shipping manifests
Paste a block of shipping labels or order addresses and the filter surfaces lines containing a city-shaped word. Chain Dedupe to collapse repeat destinations.
CRM exports with mixed location fields
Contact exports mix city, region, country, and free-form notes. Filter to city-shaped lines, then use Find most frequent to rank by destination volume.
Travel-itinerary cleanup
Scrape an itinerary, flight log, or booking confirmation - lines with place names stay, lines with dates/prices/numbers drop. Fast first pass before manual review.
Invert to strip place names
Toggle Invert to remove place-shaped lines - useful for anonymizing text dumps or pre-processing text for word-frequency analysis where place names would dominate.
Worked example
Capitalized proper-noun lines are kept; lowercase words (which do not match the default pattern) are dropped.
Paris apple New York orange Rio de Janeiro banana London
Paris New York Rio de Janeiro London
Settings reference
How each option shapes the output using the sample above.
| Setting | What it does | Effect on the sample |
|---|---|---|
| Pattern: default, Mode: Regex | Keeps capitalized-proper-noun lines | `Paris` / `New York` / `Rio de Janeiro` / `London` |
| Pattern: `^(Paris|London|Tokyo)$` | Strict alternation - only exact matches | Only `Paris` and `London` would match |
| Case sensitive: off | Capitalization no longer required | `paris` (lowercase) would also match |
| Invert: on | Drops capitalized lines | Keeps `apple` / `orange` / `banana` |
| Whole word: on (Regex mode) | Ignored - regex handles its own boundaries | No effect |