[GIS] Regular expression to match all numbers in comma-separated list in FME

fmeregexstring

In FME, I have a Feature Type with municipalities and their IDs, and a string attribute made of an unknown number of these IDs, separated by commas, like for example:

5586,5587,3468,9942

The goal is to keep only the features whose IDs are in the list. I wanted to use the StringSearcher transformer to extract the numbers in a list, but I can't figure out the Regular Expression to use.

  • I'm fairly new to FME, so is this the right way to do that?
  • If so, what would be the regular expression to use to return every numbers to the "Matched Parts Attribute"?

Best Answer

I would try the Tester transformer using the operator 'Contains'

i.e. test if [string attribute] 'contains' [ID attribute]

Seems a quicker way of implementing this; I just tried it (took 2 minutes to setup) and it seems to work fine.

Related Question