base » saveCount(text,regex,saveVar)
Description
This command saves the count of matches (based on regex) on text to a new variable denoted as saveVar. In
another word, Nexial evaluates text against regex, and then saves the number of matched portion to another variable
specified as saveVar.
Parameters
- text - the text (can be referenced via
${...}syntax) that will be evaluated. - regex - the regular expression use to evaluate against
text. - saveVar - the variable name to which the matched portion of
textwill be saved. If no match is found,saveVarwill be removed.
Example
Count the number of words that start with a capital letter.
Script:

Output:
