Command Group: Strings - Regular Expression – Category

From Bohemia Interactive Community
Jump to navigation Jump to search
(Move regex doc to Arma 3: Regular Expressions)
Tag: Replaced
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
patterns can have flags, similar to Javascript by specifying /flags at the end of the pattern.
Commands related to [[Arma 3: Regular Expressions|regular expressions]]. {{arma3}} only!
Flags need to be lowercase, if there are any non-flag characters in the flags they will be ignored and considered part of the pattern itself.


Available flags:
* g - global (only relevant for replace/find, missing global flag sets format_first_only flag https://en.cppreference.com/w/cpp/regex/match_flag_type and only replaces first occurence, only returns first element with regexFind)
* i - Case insensitive
* n - nosubs (https://en.cppreference.com/w/cpp/regex/syntax_option_type)
* o - optimize (Optimize pattern, pattern creation is slower, but will execute more efficiently, https://en.cppreference.com/w/cpp/regex/syntax_option_type)


If you don't specify any flags, the default flags are set to /gi, its valid to specify / to indicate no flags, first match only, case sensitive
[[Category:Command Group: Strings]]

Latest revision as of 23:16, 13 July 2021

Commands related to regular expressions. Arma 3 only!

Pages in category "Command Group: Strings - Regular Expression"

The following 3 pages are in this category, out of 3 total.