 There is no way for the rule engine to know what conditions the assertion may match, so no optimization of this process can be made.In many languages, regular expressions are entered as strings, which are then passed to library routines that parse and compile them into an internal state.In Perl 5, regular expressions shared some of the lexical analysis with Perl's scanner.