Last active
December 29, 2015 03:39
-
-
Save dansmith65/7609709 to your computer and use it in GitHub Desktop.
In FileMaker, return value in specified location of delimited text.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ===================================== | |
* GetDelimitedValue ( text ; delimiter ; occurrence ) | |
* | |
* RETURNS: | |
* Value in specified location of delimited text. | |
* | |
* PARAMETERS: | |
* text = (text) delimited data | |
* delimiter = (text) single character used to separate values | |
* occurrence = (number) instance to return | |
* | |
* DEPENDENCIES: | |
* none | |
* | |
* HISTORY: | |
* CREATED on 2013-NOV-13 by Daniel Smith [email protected] | |
* ===================================== | |
*/ | |
Let ( [ | |
text = text & delimiter ; | |
~start = Position ( text ; delimiter ; 1 ; occurrence - 1 ) + 1 ; | |
~end = Position ( text ; delimiter ; 1 ; occurrence ) | |
] ; | |
Middle ( text ; ~start ; ~end - ~start ) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment