RegexRule supports only regular grammar and won't let you analyze the structure of the parsed string. The result of the RegexRule parsing is NSpan. RegexRule is faster than similar TokenRule and ExtensibleTokenRule and consumes less memory.

Use token for complex tokens: strings, comments, etc. as since their structure is important, they are easier to express through predicates, and they require error recovery. If for example, you use regex to describe strings, you won't be able to recover them, and therefore the escape sequence highlighting will become impossible.

It probably makes sense to parse complex structure numbers with TokenRule/ExtensibleTokenRule as well. This way you can get information about different parts of the parsed string.