How to Do Partial Match Find and Replace in HubSpot
One of the most frustrating limitations in HubSpot is that its built-in bulk editing only works with whole property values. You can change a property from one value to another, but you cannot change part of a value. If a contact's company property is "Acme Corp (West Division)" and you want to change "West Division" to "Western Region," HubSpot's native tools require you to replace the entire string. For a handful of records with identical values, that is fine. For hundreds of records where each value is slightly different but shares a common substring, it is a dead end.
This guide explains why partial match replacement matters, where HubSpot's tools fall short, and how to do substring find-and-replace across your CRM data.
What is partial match replacement?
Partial match replacement — also called substring replacement — means finding a specific piece of text within a larger value and replacing just that piece while leaving the rest of the value unchanged.
Examples:
- Changing the area code in phone numbers:
(212) 555-1234to(332) 555-1234— you want to replace "212" with "332" without touching the rest of the number - Fixing a domain in email addresses:
[email protected]to[email protected]— you want to replace "oldcompany.com" with "newcompany.com" while preserving the username - Updating a street name:
123 Elm Street, Suite 400to123 Oak Avenue, Suite 400— replace the street name but keep the suite number - Correcting a product name in deal titles:
Enterprise Plan - AnnualtoBusiness Plan - Annual— change "Enterprise" to "Business" while keeping everything else
In every spreadsheet application, text editor, and word processor, this is basic find-and-replace functionality. In HubSpot, it does not exist natively.
Why HubSpot's bulk edit cannot do partial matches
HubSpot's bulk edit feature in the CRM list view lets you select records (including a "Select all" option) and set a property to a new value. The key word is "set." You are replacing the entire property value, not editing part of it.
This works for dropdown properties and checkboxes where you are choosing from a fixed set of options. It does not work for text properties where each record has a unique value that shares a common substring.
Let's look at a concrete example. Say you have 500 contacts with a "Company" property, and many of them include "(Acquired by BigCorp)" in the value:
- "Acme Inc (Acquired by BigCorp)"
- "Widget LLC (Acquired by BigCorp)"
- "FooBar Labs (Acquired by BigCorp)"
You want to remove "(Acquired by BigCorp)" from all of them. With HubSpot's bulk edit, you would need to:
- Find a set of records with identical values (there probably are not many)
- Select up to 50 of them
- Set the property to the correct new value (without the suffix)
- Repeat for every unique variation
Since every record has a different company name, every record needs a different replacement value. Bulk edit cannot handle this. You would need to edit each record individually.
The workarounds and their problems
Spreadsheet round-trip
The standard workaround is to export your records to CSV, open the file in Excel or Google Sheets, use the spreadsheet's find-and-replace, and import the modified file back into HubSpot.
This works for partial matches — spreadsheet find-and-replace does substring replacement. But the process has well-documented risks:
- Import column mapping errors can overwrite the wrong properties
- Character encoding issues corrupt special characters and accented names during the CSV round-trip
- No preview in HubSpot — you cannot see what the import will change before it runs
- No undo — once the import processes, the old values are gone unless you kept a backup CSV
- Time-consuming — the full export-edit-import cycle takes 20-40 minutes, and mistakes mean starting over
For a one-time change on a small dataset, the spreadsheet approach is tolerable. For recurring cleanup or large datasets, it is not sustainable.
API scripts
A developer can write a script that uses the HubSpot API to fetch records matching a filter, perform a string replacement in code, and update each record via the API.
This gives you full control over the replacement logic, including regex support. But it requires:
- Writing and debugging code
- Handling HubSpot's API rate limits (currently 100-190 requests per 10 seconds depending on account type)
- Building pagination for result sets over 100 records
- Creating a rollback mechanism if something goes wrong
- Maintaining the script for future use
For most operations teams, this is not a practical option.
Workflows (limited)
HubSpot workflows can copy and format property values, but they do not have a native "find and replace" action. The Data Hub (formerly Operations Hub) custom code action could theoretically perform substring replacement, but you would need to:
- Write custom JavaScript in the workflow action
- Define enrollment criteria to target the right records
- Handle errors and edge cases in the code
- Test thoroughly before running on production data
This is more practical than a standalone script (since the workflow infrastructure handles rate limits and execution), but it still requires coding ability and careful testing.
How to do partial match replacement properly
A dedicated find-and-replace tool solves the core problem. Here is how it works with SearchReplace — notice how the "Contains" mode matches a substring within each value:
Substring search mode
Select "Substring" as your search mode. This tells the tool to look for your search string anywhere within the property value, not just as an exact match.
Enter your search string and replacement string. For example:
- Search:
(Acquired by BigCorp) - Replace: (empty string — to remove the text)
Or:
- Search:
oldcompany.com - Replace:
newcompany.com
Preview before replacing
The tool scans all records and shows you a table with:
- The record identifier (name, email, or ID)
- The current property value
- The proposed new value (with the replacement applied)
This preview is critical. You can scan the list and catch edge cases before any data is modified. Maybe "oldcompany.com" also appears in a contact record for someone who actually works at Old Company — not a domain migration case. The preview lets you spot these.
Regex for complex patterns
For patterns that are not a simple static string, regex search mode gives you full pattern matching.
Examples of what regex enables:
Reformatting phone numbers. Search for \((\d{3})\)\s*(\d{3})-(\d{4}) and replace with +1-$1-$2-$3. This converts "(555) 123-4567" to "+1-555-123-4567" across your entire database.
Removing trailing whitespace. Search for \s+$ and replace with an empty string. Catches spaces, tabs, and other whitespace at the end of property values.
Standardizing abbreviations. Search for \bSt\.\b and replace with "Street." The word boundary markers (\b) prevent matching "St." inside other words.
Extracting domain from URL. Search for https?://(?:www\.)?([^/]+).* and replace with $1 to extract just the domain from a full URL property.
Apply and roll back
Once you confirm the preview looks correct, apply the replacement. The tool processes updates in batches, respecting HubSpot's API rate limits. Every record's original value is snapshotted, so you can roll back the entire operation if needed.
Practical examples
Example 1: Updating area codes after a region split
Your company is based in a city where the area code recently split. Old area code 212 is now 332 for new numbers. You need to update phone numbers for contacts in the affected area.
Search mode: Substring
Property: Phone Number
Search: (212)
Replace: (332)
Preview to confirm that only the intended contacts are affected and that the rest of the phone number is unchanged.
Example 2: Removing a tracking suffix from URLs
Your marketing team accidentally included a UTM parameter in the website URL property for hundreds of companies: acme.com?utm_source=import. You want to remove the tracking suffix.
Search mode: Regex
Property: Website URL
Search: \?utm_source=import$
Replace: (empty string)
The $ anchor ensures you only match the parameter at the end of the URL, not in the middle of a longer query string.
Example 3: Correcting a product name in deal titles
You renamed a product from "Starter" to "Growth." Deal names across your pipeline include the old product name: "Acme Corp - Starter - Q1 2026."
Search mode: Substring
Property: Deal Name
Search: Starter
Replace: Growth
Preview carefully. "Starter" is a common English word — make sure you are not accidentally changing deals like "Jumpstarter Inc - Enterprise - Q2."
Example 4: Standardizing state abbreviations
Your contact database has a mix of full state names and abbreviations. You want to standardize to abbreviations.
Search mode: Exact match per state (substring would cause false positives)
Property: State/Region
Search: California
Replace: CA
For state standardization, exact match is safer than substring because you do not want "California" matching inside a company name or address.
Tips for safe partial match replacement
Start with the most specific search string possible. A broad substring match can catch values you did not intend. "Inc" will match "Inc," "Incorporated," and "Lincoln." Add surrounding context to narrow the match.
Preview on a small scope first. If you are unsure about a search pattern, test it on a small subset of records before running it across your entire database.
Run replacements one at a time. If you have multiple changes to make, run them as separate operations. This makes it easier to review previews and roll back specific changes if needed.
Trim whitespace after removal. When you remove a substring, the remaining value may have extra spaces. For example, removing "(Acquired by BigCorp)" from "Acme Inc (Acquired by BigCorp)" leaves "Acme Inc " with a trailing space. Plan a follow-up pass to trim whitespace.
Keep a log. Record what you searched for, what you replaced it with, how many records were affected, and when the operation ran. This is invaluable for troubleshooting later.
Need to do partial match find-and-replace across your HubSpot data? SearchReplace supports substring and regex search modes with full preview and one-click rollback.
Keep working through the cleanup
Related HubSpot guides for planning, previewing, and validating the next step.
Wildcard Search in HubSpot: Finding Partial Matches
HubSpot's native search doesn't support wildcards or partial matching. Learn how to find substring matches, pattern-based data, and partial property values across your CRM.
Read guideCase-Sensitive Search in HubSpot: How to Target Exact Matches
HubSpot's native search is case-insensitive. Learn how to perform case-sensitive searches to find and fix data that has the wrong capitalization.
Read guideHubSpot Regex Find and Replace: Complete Guide
Learn how to use regular expressions for powerful find-and-replace operations in HubSpot. From basic patterns to advanced techniques for CRM and CMS data.
Read guideUseful Regex Patterns for HubSpot Search and Replace
A practical collection of regex patterns for common HubSpot data cleanup tasks — phone numbers, URLs, email domains, and more.
Read guideStill editing HubSpot records one by one?
Start with 100 free applied records — no credit card required.