IndexOf Post-Processing Function

 IndexOf Post-Processing Function can be used in the agents to return either zero based index position of given input text if the given input is found in field result or One if it is not. For example, I have this scraping agent "IndexOf Function Example(Post-Processing)" in my account and the field index of comma in city is using IndexOf post-processing function.

Before:

 

indexof before result

Steps:

  1. Edit the Scraping agent by the clicking on the Edit tab
  2. Go to the field index of comma in city and click on the Edit field button
  3. Now, click on the Add post- processing button to add the IndexOf function, the below dialog box will appears

    indexof function in agent
     
  4. Now, enter the text as ( ,) in the input field, and return the zero based index position of given input if that string is found in the field result, or One if it is not.
  5. Then, "Save" the function and scraping agent configuration
  6. And finally, re-run your agent to apply the changes.

After IndexOf function:

If you notice the screenshot, then find the index of comma in city has been updated by using IndexOf Post-Processing function.

indexof after result