03-31-2016 02:48 PM
Some short background: I'm working on a project (that is consuming my soul, but that is a different story). In this project I have a variable library that I can request entries from... the library stores relevant information to the specific test being run (SN, operator, etc).
When it comes time to automatically save data, I need to name the file something and I thought "Hey, it sure would be nice if I gave them the option to specify a unique file name string based on library entries". So, I decided to parse the string like the C scanf function, where you have all of the time format strings as well as %s which represents library entries.
Below is my code that does just that. My question is: string parsing is, hands down, my least favorite thing to do in LabVIEW. This solution seems a little brute force. Any suggestions on improving it?
03-31-2016 03:03 PM - edited 03-31-2016 03:03 PM
I would do something like this. The Search And Replace String can come in handy here.
03-31-2016 03:10 PM
That... is much simpler. It will also make some of the string error checking easier as well. Thank you.
I really need to learn regular expressions better.
03-31-2016 03:14 PM
@BowenM wrote:I really need to learn regular expressions better.
You and me both. Luckily I don't have any in this. Well, some would say the Scan From String does. I don't since that format is directly in the help for the Scan From String, which does not support regular expressions.