Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 781 Bytes

regex_terminals.md

File metadata and controls

15 lines (9 loc) · 781 Bytes

Regex Terminals

Another type of terminal definition is defined by a regular expression.

A regular expression is indicated by /. The content of a regular expression is put between two /. For example, X: /\d+(\.\d*)?/;, which represents a simple form of floating-point numbers.

For more information about how to write a regular expression, readers can refer to the syntax of regex.

Additionally, in the document of Rustemo, it is suggested to always wrap alternative choices such as A | B in a pair of parentheses, i.e., (A | B).

➡️ Next: Using Terminals In Expressions

📘 Back: Table of contents