Regular Expressions (VERSION 2)

A swapping-ground for Regular Expression syntax

Regular Expressions (VERSION 2)

Postby BogStandard » Thu Sep 26, 2024 12:50 pm

From the Manual, Version: 4.0.0, Additional Features, Page 38

REGULAR EXPRESSIONS (VERSION 2)
...
...
Two Regular Expression modifiers are also supported under version 2:
/i makes the regular expression case-insensitive
/g globally matches the pattern repeatedly in the string and does not stop at the first match.

From trying to use these enhancements I noted that:
1 They are suffixes to the regex expressions
2 They are mutually exlusive ie you can't use /i/g or /g/i

If I am correct could the useage be noted in the manual?

Thanks...
BogStandard
 
Posts: 23
Joined: Sun Feb 07, 2021 11:25 pm

Combining modifiers

Postby Luuk » Thu Dec 26, 2024 2:50 am

With PCRE, the modifiers may be combined like /gi or /ig.
Luuk
 
Posts: 786
Joined: Fri Feb 21, 2020 10:58 pm

Re: Regular Expressions (VERSION 2)

Postby BogStandard » Fri Dec 27, 2024 5:10 pm

OK. I'll update my RegEx.

Thanks Luuk.
BogStandard
 
Posts: 23
Joined: Sun Feb 07, 2021 11:25 pm


Return to Regular Expressions