Syntax @KeepAttributes([fme_encoded,][,]*) @KeepAttributes([fme_encoded,]fme_pcre_regex[,]+) @KeepAttributes([fme_encoded,][,]*,fme_pcre_regex[,]+) Deprecated: @KeepAttributes(fme_regexp_match[,]+) Arguments The name of the attribute to remain in the feature. Range: String A regular expression that is used to match the names of the attributes being kept. Range: String Description This function clears all attributes from a feature, preserving only those whose names are provided as arguments. This function is used to reduce the number of attributes which are associated with a feature. If the attribute name is a list attribute ending with {}, then all the attributes in this list are kept. This function is only necessary if features are being created with an extremely large number of attributes (> 1000) and if the features' lifetimes are long due to being blocked in FME factories for processing. This function is also useful when transferring structures into SAIF where the SAIF definition of a structure is a subset of the features structure attribute. It may also be used in conjunction with AutoCAD's extended entity output to reduce the number of attributes stored. If the first argument is fme_regexp_match, then all following parameters are interpreted as regular expressions (REs) and all attributes that match any of the REs will be kept. RE Construction ~~~~~~~~~~~~~~~ The following rules determine one-character REs that match a single character: Any character that is not a special character (to be defined) matches itself. A backslash (\) followed by any special character matches the literal character itself (i.e., this "escapes" the special character). The "special characters" are: + * ? . [ ] ^ $ The period (.) matches any character except the newline (for example, ".umpty" matches either "Humpty" or "Dumpty." A set of characters enclosed in brackets ([]) is a one-character RE that matches any of the characters in that set. For example, "[akm]" matches either an "a", "k", or "m". A range of characters can be indicated with a dash. For example, "[a-z]" matches any lowercase letter. However, if the first character of the set is the caret (^), then the RE matches any character except those in the set. It does not match the empty string. For example, [^akm] matches any character except "a", "k", or "m". The caret loses its special meaning if it is not the first character of the set. The following rules can be used to build a multi-character RE: A one-character RE followed by an asterisk (*) matches zero or more occurrences of the RE. Hence, [a-z]* matches zero or more lowercase characters. A one-character RE followed by a plus (+) matches one or more occurrences of the RE. Hence, [a-z]+ matches one or more lowercase characters. A question mark (?) is an optional element. The preceding RE can occur zero or once in the string - no more. For example, xy?z matches either xyz or xz. The concatenation of REs is an RE that matches the corresponding concatenation of strings. For example, [A-Z][a-z]* matches any capitalized word. Finally, the entire regular expression can be anchored to match only the beginning or end of a line: If the caret (^) is at the beginning of the RE, then the matched string must be at the beginning of a line. If the dollar sign ($) is at the end of the RE, then the matched string must be at the end of the line.