Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

regex_convert (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: string

Requires: MathScript RT Module

Syntax

a = regex_convert(option, format)

Legacy Name: regexptranslate

Description

Converts a string to a regular expression to use with the regex function, the regex_i function, or the regex_replace function.

Examples

Inputs

Name Description
option Specifies how to convert the string to a regular expression. option is a string that accepts the following values.

'escape' Inserts an escape character ('\') before the special character.
'wildcard' Converts the wildcard to a regular expression. LabVIEW replaces '*' with '\S+', '?' with '.', and '.' with '\.'.
format Specifies the pattern to convert to a regular expression.

Outputs

Name Description
a Returns the regular expression.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

a1 = regex_convert('wildcard', '*')
a2 = regex_convert('escape', '\n')
a3 = regex('a.txt, b.doc, cd.xls, 223.vi, 89.txt', regex_convert('wildcard', '*.txt'))
a4 = regex_convert('wildcard', '*.txt')

Related Topics

regex
regex_i
regex_replace


 

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