Skip to main content
Question

Parameters for StringSearcher


gg33130
Contributor
Forum|alt.badge.img+1

Hello !

I want to extract files wich have everytime a different expression but  there is some text who would be everytime in the file name :

Example : [200072692_ZONE_URBA_20220412] 

ZONE_URBA” will be the text present everytime in my extract file.

I want the String Searcher to download the files which only contains “ZONE_URBA”

The numbers in the example before and after “ZONE_URBA” will change everytime because they are the number of the EPCI (french administrative numbers)

After calling ZIP file from HTTP with HTTPCaller, I use the ZipExtractor to extract the zip file.

Then I use the StringSearcher but I don’t know how to configure the parameters to recover only the ZONE_URBA files …

 

Anyone got an idea ? I think it’s not something impossible but i’m beginner.

Sorry for my english, I promised I’ll improve !!

Thanks a lot

 

Here my work chain :

 

3 replies

raghavendrans
Enthusiast
Forum|alt.badge.img+14

@gg33130 

I think in the regular expression parameter of StringSearcher “\d+_ZONE_URBA_\d+” should do the trick.

  • \d+ — matches one or more digits before the constant.

  • _ZONE_URBA_ — matches the exact constant string.

  • \d+ — matches one or more digits after the constant.

If you know the number of digits (e.g., 9 digits before and 9 digits after ZONE_URBA), the reg exp would be

\d{9}_ZONE_URBA_\d{9}

Hope that helps.

Happy FME :-) ing

Cheers

SRG


gg33130
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 28, 2025

Thanks a lot ! It works and I got good results !

Now the problem is my results give many polygons with different shapes.

I just want to keep the polygons which have a certain shape.

In my exemple below I would like to keep only the polygon in brown and to delete all the others (in blue which are roads in reality).

I don’t know if a transformer can allow me to choose polygons according to theirs shapes ? 

Thanks a lot ! Have a good day !


raghavendrans
Enthusiast
Forum|alt.badge.img+14

@gg33130 If you can filter the polygons of interest based on an attribute, then try TESTER transformer.

Since you mentioned that the blue ones are roads, you could filter them, if any attribute data is available that denotes that it is a road.

Happy FME :-) ing

Cheers

SRG

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings