Kukulkan wrote:
It does not work until you change the RegExp to
Code:
If CreateRegularExpression(0, "(?i)some")
In the meantime I found out, that even this
does not work correctly with special characters such as the German umlauts. The following code does not find a match (PB 4.61 on Windows XP x86, tested in ASCII mode and in Unicode mode):
Code:
If CreateRegularExpression(0, "(?i)someäöü")
Dim Result$(0)
a = ExtractRegularExpression(0, "This is for SOMEÄÖÜ test.", result$())
MessageRequester("Info", "Nb strings found: " + Str(a))
For k = 0 To a-1
MessageRequester("Info", Result$(k))
Next
Else
MessageRequester("Error", RegularExpressionError())
EndIf
So if there can be non-ASCII characters in your strings,
on Windows it's better to use LCase() or UCase() instead:
Code:
pattern$ = "someäöü"
search$ = "This is for SOMEÄÖÜ test."
If CreateRegularExpression(0, LCase(pattern$))
Dim Result$(0)
a = ExtractRegularExpression(0, LCase(search$), result$())
MessageRequester("Info", "Nb strings found: " + Str(a))
For k = 0 To a-1
MessageRequester("Info", Result$(k))
Next
Else
MessageRequester("Error", RegularExpressionError())
EndIf
Using LCase() or UCase()
on Linux does not help in this regard, because they
can't handle special characters as well.

Regards, Little John