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

regex_convert (MathScript RT Module Function)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

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.

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