Locating and extracting substrings
The following @functions locate and extract substrings:
Function |
Description |
---|---|
@Begins(string ; sub) |
Determines whether a string begins with a substring. |
@Contains(string ; sub) |
Determines whether a string contains a substring. |
@Contains(string; list) |
Determines whether a string contains any substring in a list. |
@Ends(string ; sub) |
Determines whether a string ends with a substring. |
@FileDir(pathname) |
Extracts the directory part of a file path name. |
@Left(string ; n) |
Extracts the leftmost n characters from a string. |
@Left(string ; sub) |
Extracts the leftmost characters from a string up to a substring, searching left to right. |
@LeftBack (string ; n) |
Extracts the leftmost characters from a string up to the nth character from the right. |
@LeftBack(string ; sub) |
Extracts the leftmost characters from a string up to a substring, searching right to left. |
@Middle(string ; off ; n) |
Extracts n characters from a string starting at an offset, searching left to right. |
@Middle(string ; sub ; n) |
Extracts n characters from a string starting at a substring, searching left to right. |
@Middle(string ; off ; sub) |
Extracts characters from a string starting at an offset and stopping at a substring, searching left to right. |
@Middle(string ; sub ; sub) |
Extracts characters from a string starting and stopping at substrings, searching left to right. |
@MiddleBack(str ; off ; n) |
Extracts n characters from a string starting at an offset, searching right to left. |
@MiddleBack(str ; sub ; n) |
Extracts n characters from a string starting at a substring, searching right to left. |
@MiddleBack(str ; off ; sub) |
Extracts characters from a string starting at an offset and stopping at a substring, searching right to left. |
@MiddleBack(str ; sub ; sub) |
Extracts characters from a string starting and stopping at substrings, searching right to left. |
@ReplaceSubstring(source ; from ; to) |
Replaces "from" with "to" in source. If "from" and "to" are lists, replaces corresponding entries in order. |
@Right(string ; n) |
Extracts the rightmost n characters from a string. |
@Right(string ; sub) |
Extracts the rightmost characters from a string up to a substring, searching left to right. |
@RightBack(string ; n) |
Extracts the rightmost characters from a string up to the nth character from the left. |
@RightBack(string ; sub) |
Extracts the rightmost characters from a string up to a substring, searching right to left.
|
@Word(string ; sep ; n) |
Extracts word n from a string where words are the text between specified separators. |
@Word(list ; sep ; n) |
Extracts word n from each string in a list where words are the text between specified separators. |