Bryan Posted May 20, 2004 Report Share Posted May 20, 2004 Does anybody know if there is a way to select a case using regular expressions instead of exact strings or ranges? What I want to be able to do is the following: Say I have some strings like this: "FOO BAR" "FOO POST" "HELLO WORLD" "HELLO USA" What I want to do is have a case structure with 2 cases... "FOO" and "HELLO". If I wire any of the above strings to the case, I want it to select the case that matches the string segment before the whitespace, regardless of what's after the whitespace. Now the kicker... I would like to do it without using "Match Pattern" or any other extra VIs. I tried entering regular-expression-type values into the case structure, and got a non-unique case error. Is there a regular expression-type syntax that can be entered to accomplish this? I've already tried using "..." as explained in LabVIEW Help, and it appears I can only use it in one case, or I'm using it wrong. If LabVIEW doesn't support regular expressions in their case structures... perhaps they should consider it for future versions? Quote Link to comment
Bryan Posted May 20, 2004 Author Report Share Posted May 20, 2004 Nevermind, I decided on an alternative method. Quote Link to comment
Michael Aivaliotis Posted May 21, 2004 Report Share Posted May 21, 2004 If LabVIEW doesn't support regular expressions in their case structures... perhaps they should consider it for future versions? Sounds like you should post this to the wish list: http://forums.lavausergroup.org/index.php?showforum=14 Quote Link to comment
Rolf Kalbermatter Posted May 28, 2004 Report Share Posted May 28, 2004 Or you could simply specify a range. Works for strings too! "HELLO ".."HELLO!" Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.