Documentation for smfStrExtr() function
Description
A utility function to extract a substring from another string.
Syntax
=smfStrExtr( Haystack, Start, End )
Parameters
Haystack |
= |
String to extract the substring from. |
Start |
= |
String to start the extract of the substring from, FOLLOWING this string when found.
If the Start string is the tilde character (~) the extraction starts at the beginning of the Haystack string.
|
End |
= |
String to end the extract of the substring from, BEFORE this string when found. The search for this string will be after the ending of the "Start" string.
If the End string is the tilde character (~) the extraction includes the last character of the Haystack string.
|
Examples
- To extract "table" out of "1table2", you would use:
=smfStrExtr("1table2","1","2")
...which says to extract everything between "1" and "2".
- To extract "table" out of "1table12", you would use:
=smfStrExtr("1table12","1","1")
...which says to extract everything between the first "1" and the "1" following that.
- To extract "lemon" out of "lemonade", you would use:
=smfStrExtr("lemonade ", "~", "a")
...which says to extract everything starting at the first character and before the "a".
- o extract "last" out of "first/last", you would use:
=smfStrExtr("first/last", /", ~",)
...which says to extract everything starting after / all the way to the end of Haystack.
Usage notes
- None at this time.
- ...more to come?