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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.