Links
EControl Syntax Editor SDK
TecRegExpr.ModifierX Property

Extended syntax mode.

property ModifierX: boolean;

Extend your pattern's legibility by permitting whitespace and comments. 

 

Modifier /x tells the TecRegExpr to ignore whitespace that is neither backslashed nor within a character class. You can use this to break up your regular expression into (slightly) more readable parts. The # character is also treated as a metacharacter introducing a comment, for example: 

 

(
(abc) # comment 1
  |   # You can use spaces to format regular expressions - TecRegExpr ignores it
(efg) # comment 2
)

 

This also means that if you want real whitespace or # characters in the pattern (outside a character class, where they are unaffected by /x), that you'll either have to escape them or encode them using octal or hex escapes. Taken together, these features go a long way towards making regular expressions text more readable.

Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!