Can I use regex in Web Scraper?

Yes. Web Scraper Cloud supports regular expressions (regex) through Parser. Use the Regex match parser to extract matching text from a scraped field. You can also use the Replace text parser with regex to replace or remove matching text.

Extract text with regex

Open the sitemap's Parser tab, find the column you want to process, and select Add parser. Choose Regex match, enter the expression without surrounding /  characters, and preview the result before saving.

Select Match 0 to return the complete match, or select a capture group to return only part of the match. Enable Multiple if you need to return more than one match from the field.

If the result is empty

Check that the scraped source value matches the expression and that the correct capture group is selected. If the pattern only works for some records, compare the source values for formatting differences and update the expression to cover the valid variations.

See the Regex match parser documentation for examples and configuration options. For an overview of all available data transformations, see the Parser documentation.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us