Page 1 of 1

Case insensitive regex?

Posted: Sat Feb 02, 2008 8:11 pm
by Osmiroid
I've read the http://www.pcre.org/pcre.txt but I still can't figure out how to do a case-insensitive match.

Code: Select all

RegExp = CreateRegularExpression(#PB_Any, "snapshot_[0-9]{10}.jpg")

If RegExp
	If MatchRegularExpression(RegExp, "SNAPSHOT_0438293845.jpg")
		Debug "Match"
	Else
		Debug "No match"
	EndIf
Else
	Debug RegularExpressionError()
EndIf

Posted: Sat Feb 02, 2008 8:21 pm
by hallodri
try this

Code: Select all

RegExp = CreateRegularExpression(#PB_Any, "(?i)snapshot_[0-9]{10}.jpg")

you find it under "INTERNAL OPTION SETTING"

Posted: Sat Feb 02, 2008 8:27 pm
by Osmiroid
hallodri wrote:try this

Code: Select all

RegExp = CreateRegularExpression(#PB_Any, "(?i)snapshot_[0-9]{10}.jpg")
:P OK, thanks!