renojim
14 years agoCommunity Streaming Expert
Regular expressions and hex characters
It's quite possible I'm doing something wrong, but it appears the \x escape sequence isn't recognized. Example:
This tries to match the hex byte E2, but the IsMatch() returns false.
-JT
ba = CreateObject("roByteArray")
ba[0] = &hE2
ba[1] = &h80
ba[2] = &h99
str = ba.ToAsciiString()
regex = CreateObject("roRegEx","\xe2","")
print regex.IsMatch(str)
This tries to match the hex byte E2, but the IsMatch() returns false.
-JT