INPUT /  OUTPUT /  LANGUAGE





? operator

Field operator

Generates the positions at which a value appears in a field.

Applies to...

Vector fields and scalar fields holding text.

Sample usage

Behaviour

Takes one value to search for. For a vector, generates the position of each element equal to that value. For a scalar holding text, generates the position of each character at which the text being searched for begins. Positions start at 1. If there are no matches, nothing is generated.

The operator takes a value, so it needs angle brackets of its own: <where:vector <pets.? {cat}>>. Without them, the value would be read as part of the surrounding tag.

See also