To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI is for finding and returning matches to a search string within a 1d string array and the respective indices of the results.
Description
This VI makes use of the search/split string function to find matches of a search term in a string array. For example, if you have an array with the following elements:
Element1, Element2, Element3
You could search for Element to return an array of both the results Element1, Element2, Element 3 and their indices 0, 1 and 2. The input array and search term terminals accept a 1d array of strings and an individual string respectively. The match indices and match values outputs return 1d arrays of long integers and strings respectively.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Why didn't you just use the Auto Indexing on the FOR loop for the Input Array. That would eliminate the need to use Array Size wired to N and the need to index the value inside the loop.
Here's how I would clean up this VI.
Thank you for the feedback crossrulz, I will have a look and incorporate changes. The VI itself was adapted from a larger project in which it was a recursive VI instead, which will explain why some of the code might seem strange or out of place. But thank you for your suggestions!