Use with: |
Startup scripts, Terminal Launcher, Web, and Windows |
SecureLogin version: |
All |
Type: |
Action |
Usage: |
RegSplit regex_input-string output-string1 output-string2 |
Arguments: regex input-string output-string1 output-string2 |
The regular expression. The string that will be split. The first subexpression. The second subexpression. |
Description: |
The RegSplit command enables you to split a string by using a regular expression. Output-string1 contains the first subexpression. Output-string2 contains the second subexpression. |
Example: |
Dialog Title "Login" Ctrl #1 EndDialog ReadText #301 ?Text Regsplit "Please enter the password for (.*) account" ?Text ?User SetPlat ?User Type $Username #1 Type $Password #2 Click #1
|
Open text example: |
#?InputString: "This is a long string with a few components in it" |
Command: |
Regsplit "This (.*) a long (.*) with (.*) components (.*)" ?InputString ?first ?second ?third ?fourth |
Result: |
?first = "is", ?second = "string", ?third = "a few", ?fourth = "in it" |