Rule: RegEx Counter (AI Interpolator Extractor)
Base data:
Summary:
The RegEx Counter rule will take a regular expression set in the settings and run it against a raw text or an HTML or some other textual data to count how many times it exists.
In the background it basically runs a preg_match_all on your content, using your defined regular expression.
Module needed:
AI Interpolator Extractor
Field types to populate:
Number (integer) field (core number).
Base Fields types to use as context:
- Text (plain)
- Text (plain, long)
- Text (formatted)
- Text (formatted, long)
- Text (formatted, long, with summary)
Extra Requirements:
Not a hardware requirement, but don't setup this if you don't know how regular expressions works.
Extra Settings:
None
Extra Advanced Settings:
Regular Expression
Add your regular expression that you want to count the context source for. If you do not set a working regular expression, this will fail. Use regex101 to figure out if your regular expression works correctly.
Possible example use cases:
- You want to know how many times a word exists in a raw text dump.
- You want to scrape a webpage and count how many external links it has, by just giving the link. Can be done together with the AI Interpolator Scraping Bot.
- You want to extract links to how many times a sentence exists in a PDF, Excel or Word file. Can be done together with the AI Interpolator ConvertAPI.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion