CreateRegularExpression

Family: RegularExpression · 2 forms

What it does

CreateRegularExpression writes a value: it creates rather than reads. It takes regularExpression (an integer) and pattern (a string), and answers an integer. That is the first of 2 forms.

Syntax

1
CreateRegularExpression(regularExpression integer, pattern string) → integer
2
CreateRegularExpression(regularExpression integer, pattern string, options integer) → integer

Parameters

NameTypeIn forms
regularExpressionintegerall
patternstringall
optionsinteger2

Every form returns

integer

Example · generated

Form 1, the short one

regularExpression = CreateRegularExpression(1, "value")DO  Sync()LOOP

Form 2, with every argument

regularExpression = CreateRegularExpression(1, "value", 1)DO  Sync()LOOP

CreateRegularExpression is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

19 commands in RegularExpression