StringScanner.ScanToSmatch Function
Syntax
Text as C = ScanToSmatch as C(pattern as c)
Arguments
- Text
The text between the starting and ending offset positions.
- pattern
The text that you want to find. You may use the "?" (single character) and "*" (any number of characters) expressions.
Description
Skip until a patterns is encountered. Return text we scanned over.
Discussion
The <StringScanner>.ScanToSmatch() function moves the offset to the beginning of the Find_Text and returns the text between the starting and ending positions of the offset.
Example
dim scanner as P
dim txt as C
txt = <<%text%
This is wonderful prose written
by a technical writer of great merit.
%text%
scanner = stringscanner.create(txt)
? scanner.ScanToSmatch("gr*t")
= This is wonderful prose written
by a technical writer of
? scanner.GetToOffset()
= This is wonderful prose written
by a technical writer of
? scanner.getremainder()
= great merit.See Also