Scenarios it handles
Clean messy values
Remove, replace, trim, or reformat text before it is exported.
Extract part of a value
Use matching rules or regular expressions to keep only the text pattern you need.
Standardize across rows
Add prefixes, remove repeated text, or normalize inconsistent values across rows.
Reformat dates and timestamps
Convert date formats, relative dates, Unix timestamps, or timezone offsets into a consistent output.
- Removing labels such as
Price:orRating: - Replacing unwanted characters or extra spaces
- Adding a prefix or suffix to each value
- Reformatting dates or converting timezones
- Decoding HTML entities into plain text
Access Clean Data
1
Select the field
In the data preview or field list, select the extracted field you want to clean.
2
Open the field menu
Click the
... menu for that field.3
Choose Clean Data
Select Clean Data to open the data cleaning workflow.
4
Add a cleaning step
Click Add Step, then choose the operation you want to apply.
5
Preview the result
Check the preview value before saving the rule.
Common refinement operations
Use RegEx for pattern-based cleanup
Regular expressions are useful when the value follows a pattern but cannot be cleaned reliably with simple replace or trim rules:- Extract a number or price embedded in a sentence
- Match text before or after a known delimiter (e.g.
:,|,-) - Keep only part of an HTML attribute value
- Remove patterns that repeat differently across rows
- Isolate a substring from a value that varies slightly from page to page
For a full list of patterns and syntax, see the RegEx Cheatsheet for Data Extraction in the Help Center.
Example: extract a value from an attribute
Some websites store useful data in attributes rather than visible text. For example, a rating may be stored in an image attribute such asalt="5 stars" or in a source value such as src.
1
Select the element
Select the element that contains the value you need, such as a rating icon or text block.
2
Choose the source value
Use options such as Image URL, OuterHTML, or Other Attributes depending on where the value is stored.
3
Customize the field
Open the field menu and choose Customize Field or Clean Data.
4
Extract the target value
Select the relevant attribute, or use RegEx to match the part of the HTML you want to keep.
5
Preview before saving
Confirm that the preview shows the expected value before running the task.
Limits of field refinement
Refinement rules clean the value Octoparse has already extracted. They do not change how the web page is structured. For example, if a multi-line text block appears as several lines visually but is actually one single element in the page source, Octoparse may treat it as one field. In that case, you may not be able to split it into separate fields by visual line breaks alone. Check the source structure and use field selection, extraction settings, or RegEx cleanup depending on how the data is actually stored.Best practices
- Refine fields after confirming the correct element is selected.
- Use simple cleaning steps before trying RegEx.
- Preview each step before saving.
- Keep field names clear so exported data is easy to understand.
- Avoid over-cleaning if the downstream system can handle formatting later.
- Document complex RegEx patterns so teammates can maintain the task.