Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

regexp (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the string class.

Syntax

m = regexp(a, format)

m = regexp(a, format, 'once')

[m, n] = regexp(a, format)

[m, n] = regexp(a, format, 'once')

Description

Performs a case-sensitive search for a regular expression in the input string a and returns the first and last indexes of the matched strings.

Examples

Inputs

Name Description
a Specifies the string to search.
format Specifies the pattern for which you want to search in a. format is case sensitive.
'once' Directs LabVIEW to return the first and last indexes of only the first matched string.

Outputs

Name Description
m Returns the first indexes of all matched strings. If you specify 'once', m returns the first index of the first matched string.
n Returns the last indexes of all matched strings. If you specify 'once', n returns the last index of the first matched string.

Examples

a = 'Run regexp in LabVIEW MathScript';
format = 'L[a-zA-Z]+W';
[m, n] = regexp(a, format)

Related Topics

regexpi
regexprep
regexptranslate
strfind


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit