PhantomScript v1.7 Reference - Copyright © 2006 P1 Systems Incorporated. All Rights Reserved.

Prev | Next | Users Guide | PhantomScript Reference | P1 Systems


 Strings

RegExSplit

Syntax

RegExSplit <string> <separators> [MatchCase]

Description

Return the contents of <string> as a list of substrings separated by the characters matched by the regular expression <separators> .

Parameters

<string>

The string to be processed.

<separators>

A regular expression specifying, as capture subexpressions, the substrings that separate the substrings to be extracted from the string. Capture subexpressions are enclosed in parentheses.

Remarks

See also Tokenize and StringAsList.

Example

   Local str = "http://www.p1.com/index.html"
MessageBox Text=RegexSplit str "([/\.:]+)"

The above code fragment displays the string "http,www,p1,com,index,html" in the message box.



Prev | Next | Users Guide | PhantomScript Reference | P1 Systems

PhantomScript v1.7 Reference - Copyright © 2006 P1 Systems Incorporated. All Rights Reserved.