Example Code

Search an array of strings to find particular strings in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example searches for a substring in all of the search elements, if it is found the entire element is removed from the Result List

 

Description

This VI takes strings out of an array of strings if they contain a  particular substring. The VI passes in an array of strings which this VI parses looking for a particular string or character which is also passed in. If passed not found, the string under test is added to the output string. If it is found, the string is ignored.

 

Requirements

LabVIEW Full Development System 2012 or compatible

 

Steps to Implement or Execute Code

  1. Enter the Search list elements
  2. Enter the Search Substring to be searched for
  3. Run the VI
  4. The result List will not have any element that has the search substring 

 

 Additional Information or References

VI Block Diagram

10766.PNG

 

**This document has been updated to meet the current required format for the NI Code Exchange. **

 

Jeff | LabVIEW Software Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.