Skip to main content
Question

How can FME search for variations in word casing?

  • December 27, 2017
  • 3 replies
  • 17 views

Forum|alt.badge.img

Hi,

I have a work space that creates an error report for a dataset, that I would like to amend.

The current error report brings back the error "Area of Outstanding Natural Beauty (AONB)' fails check for case is 'FULL_TITLE", however this isn't an error as the of being lower case is to be expected. In FME, for strings like the above, how can I allow 'of' to be lower case and not be included in the error report please?

I think it might be require a regular expression of some sort, but not sure if \\bof\\b would do the trick.

Would really appreciate your help.

Thanks,

JB

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • December 27, 2017

The AttributeValidator has a check if one or more attributes match a specified case.


Forum|alt.badge.img
  • Author
  • 3 replies
  • December 28, 2017

Thanks Erik.

I have given AttributeValidator a go, but still not sure how to ask it to allow 'of' when it is in the middle of a string such as Areas of Outstanding... In the rule configuration section, what would the regular expression be please?

Jess


erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • December 28, 2017

In the case of this sting, I needed two StringReplacer transformers to validate the text.

The first replaces " of " by " Of ", which matches your question.

The second was needed to replace the text in parentheses using the regular expression "\\([A-Z]*\\).