I’ve been needing to identify leading and trailing spaces across many attributes, with a significant number of features. I don’t need to trim them, but rather identify their existence.
The only solution I’ve been able to come up with so far is to use AttributeValidators - this way, I can set it to run against the 50 or so fields that need to be validated. I’m using Regex and the rule “^ +” for leading spaces, and a second AttributeValidator with the rule “ +$” (double quotation marks only for readability here, not used in the Rule Configuration) for trailing spaces.
This works, but it is very slow. Is there a better way to do this within FME, without resorting to some Python?
Thanks in advance for any thoughts on alternative approaches!




