I was using the "Search and Replace Pattern VI" with TRUE wired to "replace all?"
It did not replace any.
I will convert (create a subvi) using the while loop as you showed and I'm sure it will work.
I wonder if I stumbled onto a bug with LV2010...
I didn't even think to try that, but it worked for me. I just deleted the While Loop and wired the Boolean constant.
Have you right-clicked the node and checked "Regular Expression"?
I wasn't using the Matche Regular Expression!!
I was using this one!
Well, it partially worked... 😉
I've posted another Regexp solution here which explains the following expression: (-?[\d]+\.?[\d]*)|(-?\.[\d]+). I used it to extract numbers from a string.
It made me think of the expression, "If the only tool you have is a hammer, you tend to see every problem as a nail." ~ Abraham Maslow
Lots of interesting info and tools listed in the Coding Horror blog post. What about LabVIEW?
I needed to process a bunch of old TestStand 1.0 and 3.0 HTML reports for import into a database. I thought, what a great way to learn regular expressions!
After some research, I kept reading "you can't use regex to parse HTML". Since I had structured HTML in two different flavors (basically out of the box reportgen_html and a couple of additions to the header) I tried anyway and came up with this. I had to parse the data further, but that was specific to my application. This VI was used to clean the HTML tags.
I will probably borrow from your code when I get a chance to return to the project that I was working on and posted earlier in this thread.
You should submit this for the example code contest.
I answered this question:
[...] have: C1-C10
(C1-C10 means there are actually ten cmponents; C1, C2, C3...C10)
I now want to convert the array containing C1-C10 into an array looking like this:
... with this Regexp:
Read the Regexp like: