10-26-2012 03:40 PM
I'm struggling with using the search and replace patter to replace a number of substring matches within a string, can anyone help and tell me what am I doing worng? Not an expert in regexps
I'm basically trying to replace all the matches for "NONE","none" or "normal" with "OK within the "1NONE2none3normal4" string
Thanks
Solved! Go to Solution.
10-26-2012 03:59 PM
1. Ditch that VI and use Search and Replace String instead
2. Right-click and select 'Regular Expression'
3. Wire True to Replace all and Ignore Case
4. Search string = (none|normal)
10-26-2012 05:06 PM
Awesome, that works
Could this possibly be a bug or perhaps I'm not using it the right VI to solve my problem?
Thanks!
10-26-2012 06:51 PM
@icastillejos wrote:
Awesome, that works
Could this possibly be a bug or perhaps I'm not using it the right VI to solve my problem?
Thanks!
You're not using it correclty. The Match Pattern within this VI does not fully support regular expressions.
10-26-2012 07:03 PM
Well I just chcked the detailed documentation and there is nothing about the limitations which leads me to believe otherwise... anyway I solved my issue
Thanks!
10-29-2012 09:54 AM
From the help on for the "Match Patern" VI: "This function is similar to the Search and Replace Pattern VI. The Match Pattern function gives you fewer options for matching strings but performs more quickly than the Match Regular Expression function. For example, the Match Pattern function does not support the parenthesis or vertical bar (|) characters." The "Search and Replace Pattern.vi" uses Match Pattern internally.