Skip to main content

Position of first/last occurrence

Anatomy

<pos var="var" value="string" offset="int" type="chars-first">
string
</pos>

Description: POS finds the position of first or last occurrence of a value within a subject and returns the index of the corresponding byte or character if applicable.

If the offset is negative it will start that many bytes or characters from the end of the subject.

Attributes

NameTypeDescriptionDefined By
varvarResult variable name pos
valuestringValue pos
offsetintSearch offset pos
typetypeMeasurement type pos

Results:

BindingTypePredicate
varN/A

Examples

Example

<output>
<pos value="X">iXML</pos>
</output>

<!-- 1 -->