cfSubstitudeWildCard ( text ; searchString ; replaceString ; start )
Replace all occurrences with wildcard
Be the first to rate this function Log in to vote
Kadir Kaleli - Show more from this author
Yordam http://www.yordam.com |
cfSubstitudeWildCard ( "text|1 text|2 text|abc text|cx" ; "|#" ; "X" ; 1 )
cfSubstitudeWildCard ( "word text world text" ; "r@" ; "" ; 1 )
cfSubstitudeWildCard ( "word text world text" ; "ex@" ; "Y" ; 1 )
cfSubstitudeWildCard ( "word123 text world345 text" ; "d###" ; "" ; 1 )
textX textX text|abc text|cx
wo text wod text
word tY world tY
wor text worl text
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Replace with wildcard
for string use @
for number use #
Use these function together:
cfSubstitudeWildCardIsNumOrText ( _text1 ; _text2 )
Case( Length(_text1) > 0 ;
Case (
Left(_text1;1) = Left(_text2;1) ; 1 ;
Left(_text1;1) = "Ω" ; 1 ;
Left(_text1;1) = "≈" and GetAsNumber(Left(_text2;1)) ≠ "" ; 1 ; 0
) & cfSubstitudeWildCardIsNumOrText (Right(_text1;Length(_text1) -1 ); Right(_text2;Length(_text2) -1 ) )
; _text1
)
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.