C10 - initial
count (Sifts) | |
---|---|
Type | Corrade progressive sift |
Sift | count |
Parameters | a string representing a regular expression (regex) |
Description | The count sift will count the number of items in a list that match a supplied regular expression. |
Last Changes | None |
The count
sift will count the number of items in a list that match a supplied regular expression.
Position | Type | Description | Example |
---|---|---|---|
0 | regex string | A regular expression to match each individual element of the list against. | [0-9] |
The regular expression dialect used by Corrade is the .NET regex dialect.
The following sift when added to a command will skip the first 2
items and then count the number of elements of the list that match the regular expression /[0-9]+?/
:
"sift", wasListToCSV([ "skip", 2, "count", "[0-9]" ]),
Given the input
data=a,1,c,2,e,3,h,4,h,5,j,7
the expected output is:
data=5
For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.