05-06-2015 01:35 PM - edited 05-06-2015 01:37 PM
I am encountering a problem while attempting to use the "Match Regular Expression" VI with unicode Strings. I do realize that Unicode is not officially supported, but if anyone has any ideas they would be greatly appreciated.
I am sending the following string to the match regular expression VI: Press to Lock Doors&Press To Unlock Doors. I am searching for the "&" in an attempt to seperate the string into two parts. The before match should return "Press to Lock Doors", and the after match should return "Press To Unlock Doors". However, the problem is that the after match is returning "倀爀攀猀猀 吀漀 唀渀氀漀挀欀 䐀漀漀爀猀".
I have attached the test VI that I am using. For those of you unfamiliar with unicode, it is not enabled in Labview by default. In order to enable it the following line must be added to the labview INI:
UseUnicode=True
Does anyone know why this is occuring? Is there a work around?
05-06-2015 02:09 PM - edited 05-06-2015 02:10 PM
I wasn't able to find a solution to the problem, but I did find a work around. The match regular expression VI does not seem to be unicode friendly. I replaced it with the Match Pattern VI. My application is simple enough that I do not need the extra functionality of the match regular expression.
If you are working with unicode it seems that the Match Pattern VI is what you will have to use. Hope this helps someone.