regexp->matchesStart

Tests whether input starts with the pattern.

Target member

Signature

1regexp->matchesStart(position::integer= ?)

Tests whether input starts with the pattern.

regexp->matchesStart is called with member syntax on a receiver value. regexp->matchesStart uses the regular-expression surface for pattern matching. Keep patterns small, name the intent in nearby code, and test captures separately from replacement strings.

Parameters

position
Optional value of type integer. Supply position positionally unless the signature shows a keyword form.

Examples

Basic call

1regexp('[a-z]+', '', 'abc')->matchesStart
The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.