SubstituteCompletely ( text ; searchString ; replaceString )
A better Substitute() function
Average rating: 4.4 (29 votes) Log in to vote
Peter Wagemans - Show more from this author
Lesterius https://www.lesterius.com |
SubstituteCompletely ( "abbbbc"; "bb"; "b")
"abc"
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function substitutes multiple instances of a search string. Handy for removing excess spaces, returns or tabs from a text.
revision history:
20050511: added "and not PatternCount ( replaceString ; searchString )" to keep the function from going into a loop when the replacement string contains the search string. Thanks to Steven Sanders for pointing that out.
Comments
Bill Doerrfeld, Seattle Apr 30, 2009 |
||
It would be nice if this function followed the built-in Substitute() function allowing multiple DIFFERENT searching strings to be specified (delimited via brackets). | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.