<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !STR.- String Command > String Operations |
MiniRobotLanguage (MRL)
STR.fay
STR.Find Any
General Multi-Instring Command, will search for multiple Terms in one run.
Intention
This command is used to test if one of multiple Terms is inside a given String.
It will return the found Term and the Number of the term.
It will not return where the term was found.
It will only return the first found term.
$$OUT=?exeloc\Result.txt
$$TXT=<ABCDEFG>$crlf$<123456>$crlf$<abcdefg>$crlf$
$$SEA="XBC","FG"
$$POS=1
$$NUM=3
STR.fay|$$TXT|$$SEA|$$POS|p
DMP.6
MBX.!
ENR.
Result:
The Term FG has been found, which is the second Term.
$$OUT=?exeloc\Result.txt
$$TXT=<ABCDEFG>$crlf$<123456>$crlf$<abcdefg>$crlf$
$$SEA="BC","FG"
$$POS=1
$$NUM=3
STR.fay|$$TXT|$$SEA|$$POS|p
DMP.6
MBX.!
ENR.
The Term BC has been found, which is the First Term.
Syntax
STR.fay|P1|P2|P1|P2
STR.Find Any|P1|P2|P1|P2
Parameter Explanation
P1 - (Mainstring,Text) Variable with Text (Mainstring).
P2 - (Input,Text) Variable with the Terms that are searched. All Terms must be delimited using " " and separated using ,
Example: $$SEA="Term 1","/A","/D"
P3 - (Input,Numeric) Variable with Starting-Position from where the Search will start.
P4 - (Input,Character) Optional Search Type:
p - default search "perfect Match"
e - Equalcase Search
w - Standard Search Pattern Search
Example
'*****************************************************
' EXAMPLE 1: TXT.gal
'*****************************************************
$$OUT=?exeloc\Result.txt
$$TXT=<ABCDEFG>$crlf$<ABCDEFG>$crlf$<ABCDEFG>$crlf$
TXT.Load_Pure_Text|$$TXT
$$HEA=123
$$POS=2
TXT.Insert_Line_after_Line|$$HEA|$$POS
TXT.Save_File|$$OUT
ENR.
Remarks
-
Limitations:
-
See also:
• 1.5.2 Working with Text-Strings
• VAR. - Variable Set Value/Clear
• IVS. / NVS. - If-Variable-String
• SBD. - String between Delimiter
• SBM. - String between Delimiter-Multiple