Regex Post-processing Function

Regex Post-processing function can be used to extract the string in our extracted field result. For example, I have this scraping agent “Regex Function Example(Post-Processing)” in my account and I want to extract state from City field. Here, we can use the Regex Post-processing function to extract the state from City field.

Before using Regex function


  1. Edit the scraping agent by clicking on the Edit tab.

  2. Add a new field, name it something like me named it State and selector will be same as for City field.

  3. Now, click on the Add Post-Processing button to add the Regex Post-Processing function, The below dialog box will appear.

  4. Now, enter the Regular expression as [^,]+,\s*(.*) in Expression parameter and enter the Group index as (1) in Group parameter which shown in above screenshot.

  5. Then, Save the function and the scraping agent configuration.

  6. And finally, re-run you agent to apply the changes.

After Regex Function

Now, if we notice the below screenshot, we get the new field State with updated result.

Signup now to get 100 pages credit free

14 days free trial, no credit card required!