05-01-2014 07:23 PM
Hi,
I am trying to do a search and replace formatting of a string.
In the example I am looking for string "PASSED" but it must also start with usbflash and some number + PASSED.
I can't get the format to have a number from 1-99. The number of replacements should add up to 6 in this case. I have tried with \d for any number, and I also tried [1-99].
Solved! Go to Solution.
05-02-2014 03:30 AM
Please post the VI that you have tried so far along with the String input (In 2011 LV version please).
05-02-2014 04:27 AM
Try this attached file.
05-02-2014 07:01 AM
You could use Scan From String with a format of %d. That will read off the number and the remaining string should then be "PASSED".
05-02-2014 09:35 AM - edited 05-02-2014 09:56 AM
Attachment - stringtest
My attachment is not uploading !
05-02-2014 10:38 AM
@hasse wrote:
Attachment - stringtest
My attachment is not uploading !
Try zipping up your VI and posting that.
05-02-2014 11:08 AM
05-02-2014 11:10 AM
I don't know why it's not working to upload ether ,zip or a vi?
I uploaded 2 images for the front panel and block diagram. Hope you can read it!
05-02-2014 11:18 AM - edited 05-02-2014 11:20 AM
Right click on the Search And Replace String function. There is an option to use Regular Expressions. Then give this a try.
EDIT: You will need to set the Replace All input to TRUE.
05-02-2014 11:30 AM
Thank you crossrulz!
I had it set as regular expression - it was the plus sign that was missing.