Polybench® for biosignals / reference 1.34.1
Parser for wildcard filters

Filter items with wildcards

Overview

Some functions in Polybench allow to specify or filter items using optional wildcard characters. This documents describes the way wildcards can be used.

In Polybench, the general wildcard character is the asterisk '*'.

Wildcards allow filter functions like 'all items that begin with...', or 'all items that end with...', or 'all items that contain...'.

Details

Examples

The meaning of wildcards is best explained with examples:
Assume we have this array of items:

UNI 1, UNI 2, UNI 3, UNI OPT, BIP 1, BIP 2, BIP 3, BIP OPT, EXT UNI

Using wildcards, we can filter a sub-set of the above array, for example:

UNI* results in UNI 1, UNI 2, UNI 3, UNI OPT

BIP* results in BIP 1, BIP 2, BIP 3, BIP OPT

*OPT results in UNI OPT, BIP OPT

*UNI results in EXT UNI

*I* results in UNI 1, UNI 2, UNI 3, UNI OPT, BIP 1, BIP 2, BIP 3, BIP OPT, EXT UNI

U*I* results in UNI 1, UNI 2, UNI 3, UNI OPT

EXT UNI results in EXT UNI

Note that by not using a wildcard character, a specific channel is selected
UNI 3 results in UNI 3

Formal meaning of the wildcard

A* means all items that begin with A
*A means all items that end with A
*A* means all items that contain A
A means only item A
* means all items
A*B means all items that begin with A and end with B

Also possible

A*B* means all items that begin with A and that contain B
*A*B means all items that contain A and that end with B
*** means all items that contain the character '*'