Function overview
Prototype
Exclude (
TextToFilter; FilterText )
Parameters
TextToFilter
FilterText
Description
Tags:
Filter Exclude
Exclude the characters to be filtered
-----------------------------------------
it is not a recursive function
-----------------------------------------
limited version : FilterText ≤ 404 characters
For Exclude value on a list, used FilterList()
-----------------------------------------
Respect case sensitive and accents [like Filter()]
Respect smart quotes "”“ and apostrophizes '‘’ [like Filter()]
-----------------------------------------
Examples
Sample input
Exclude ( "Exclude character strings" ; "aeiouy" )
Exclude ( "test Quotes, \“left and right\” quotes" ; "\”" )
Sample output
Excld chrctr strngs
test Quotes, “left and right quotes
Function code
// Exclude ( TextToFilter; FilterText ) v3.0
//---------------------------------- Example
// Exclude ( "Exclude character strings" ; "aeiouy" ) Result => Excld chrctr strngs
// Exclude ( "123EbCé789TX" ; "1234567890") Result => EbCéTX
// Exclude ( "d'Eéeè_ àOo" ; "é'E ao") Result => deè_àO
// Exclude ( "test Quotes, \“left and right\” quotes" ; "\”" ) Result => test Quotes, “left and right quotes
/*
Provides an inverse of FileMaker 7's built-in Filter() function.
Exclude the characters to be filtered
[limited version : FilterText ≤ 404 characters - respect case sensitive, quotes and accents, just like Filter()]
*/
//----------------------------------
// @ Agnès. BugReport - filemaker@tictac.fr
// ------------------- "false small recursive"
Let ([
$Exc_Text = TextToFilter ;
$Exc_No = FilterText ;
$Exc_n = 0;
Exc_Calc = Substitute ( ( 10 ^ Length ( $Exc_No ) ) - 1; 9; "Quote ( Middle ( $Exc_No; let ( $Exc_n = $Exc_n + 1; $Exc_n ); 1 ) ) & \"^#|#^\" & " );
Exc_Result = "[" & Substitute ( Case ( not IsEmpty ( $Exc_No ); Evaluate ( Exc_Calc & "\"\"" ) ); [ "^#|#^"; ";\"\"]; [" ] ) & "\"\";\"\"] )"
];
Evaluate ( "Substitute ( $Exc_Text; " & Exc_Result )
)
// ===================================
/*
This function is published on FileMaker Custom Functions
to check for updates and provide feedback and bug reports
please visit http://www.fmfunctions.com/fid/152
Prototype: Exclude( TextToFilter; FilterText )
Function Author: Agnès (http://www.fmfunctions.com/mid/46)
Last updated: 27 June 2010
Version: 1.2
*/
// ===================================
// Exclude ( TextToFilter; FilterText ) v3.0__LITBR____LITBR__//---------------------------------- Example__LITBR____LITBR__// Exclude ( "Exclude character strings" ; "aeiouy" ) Result => Excld chrctr strngs__LITBR__// Exclude ( "123EbCé789TX" ; "1234567890") Result => EbCéTX__LITBR__// Exclude ( "d'Eéeè_ àOo" ; "é'E ao") Result => deè_àO__LITBR__// Exclude ( "test Quotes, \“left and right\” quotes" ; "\”" ) Result => test Quotes, “left and right quotes__LITBR____LITBR__ /*__LITBR__ Provides an inverse of FileMaker 7's built-in Filter() function.__LITBR__ Exclude the characters to be filtered__LITBR__ [limited version : FilterText ≤ 404 characters - respect case sensitive, quotes and accents, just like Filter()]__LITBR__ */__LITBR____LITBR__//----------------------------------__LITBR__// @ Agnès. BugReport - filemaker@tictac.fr__LITBR__// ------------------- "false small recursive"__LITBR__ __LITBR__ Let ([__LITBR____LITBR__$Exc_Text = TextToFilter ;__LITBR__$Exc_No = FilterText ;__LITBR__ __LITBR__$Exc_n = 0;__LITBR__Exc_Calc = Substitute ( ( 10 ^ Length ( $Exc_No ) ) - 1; 9; "Quote ( Middle ( $Exc_No; let ( $Exc_n = $Exc_n + 1; $Exc_n ); 1 ) ) & \"^#|#^\" & " );__LITBR__Exc_Result = "[" & Substitute ( Case ( not IsEmpty ( $Exc_No ); Evaluate ( Exc_Calc & "\"\"" ) ); [ "^#|#^"; ";\"\"]; [" ] ) & "\"\";\"\"] )"__LITBR____LITBR__ ];__LITBR__Evaluate ( "Substitute ( $Exc_Text; " & Exc_Result )__LITBR__)__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/152__LITBR____LITBR__ Prototype: Exclude( TextToFilter; FilterText )__LITBR__ Function Author: Agnès (http://www.fmfunctions.com/mid/46)__LITBR__ Last updated: 27 June 2010__LITBR__ Version: 1.2__LITBR____LITBR__*/__LITBR__// ===================================
Login or register to comment
Create a new account with fmcustomfunctions.com or login to post a comment.
Comments
17 December 2008
This version is limited => FilterText : 404 characters max
"Unlimited" version is possible but is it necessary ?
you often have more than 400 characters excluded ?
Thanks,
Agnès
(Edited by Agnès on 17/12/08 )