Can you please add a #PB_RegularExpression_Caseless to CreateRegularExpression() flags ?
This would require passing PCRE_CASELESS to PCRE (I believe).
Would be handy when you don't care about case instead of to have to remember to put some modifiers inside every regex.
[Implemented] caseless for CreateRegularExpression()
[Implemented] caseless for CreateRegularExpression()
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: #PB_RegularExpression_Caseless for CreateRegularExpressi
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: #PB_RegularExpression_Caseless for CreateRegularExpressi
Can't you just use (?i)?
Re: #PB_RegularExpression_Caseless for CreateRegularExpressi
Yes ("instead of to have to remember to put some modifiers inside every regex").jassing wrote:Can't you just use (?i)?
We could also just use (?s) for #PB_RegularExpression_DotAll, (?x) for #PB_RegularExpression_Extended, (?m) for #PB_RegularExpression_MultiLine, etc. but we have flags for those anyway.
Sometimes is convenient to have a global setting active and change it locally only IF and WHEN you need to do so.
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: #PB_RegularExpression_Caseless for CreateRegularExpressi
YES!!!!
I agree with luis, please add a #PB_RegularExpression_Caseless.
I agree with luis, please add a #PB_RegularExpression_Caseless.
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
-
- Addict
- Posts: 4779
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: #PB_RegularExpression_Caseless for CreateRegularExpressi
The situation is even worse, because (?i) does not work correctly with special characters such as the German umlauts, see http://www.purebasic.fr/english/viewtop ... 44#p383144luis wrote:Yes ("instead of to have to remember to put some modifiers inside every regex").jassing wrote:Can't you just use (?i)?
Regards, Little John
Re: #PB_RegularExpression_Caseless for CreateRegularExpressi
Sorry for being dense -- but what is the difference if you have to add 3 characters to your string, or add a flag? Either way you have to remember to do something....Yes ("instead of to have to remember to put some modifiers inside every regex").
is this a problem with pcre itself, with PB's implementation of pcre, or the use of (?i) is reserved for only english characters?[...](?i) does not work correctly with special characters such as the German umlauts[...]