LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with unicode and match regular expression

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?

 

 

0 Kudos
Message 1 of 2
(2,779 Views)

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.

0 Kudos
Message 2 of 2
(2,761 Views)