Solved

Reges expression problem

  • 13 January 2023
  • 3 replies
  • 3 views

Badge +3

Hello ,

I am not sure how to use Regex expression

First example :

street name 34 (56)

street name 56 ( 44 )

street name 55(70) or street name 55( 70 )

I would like to extract the number between parentheses and add - before the number

so it should be street name 34 - 56

 

second example :

street name 56 (text)

street name 40 ( text )

street name 10(text)

street name 40( text )

i would like to extract the text between parentheses and create it in new column

 

third example :

street name 20 ( GdR 20 )

street name 22 (23-50)

I would like to extract it and add - before the value in parentheses

So it should be street name 20 - GdR 20

thanks in advance

FME 2021

icon

Best answer by danilo_fme 15 January 2023, 11:42

View original

3 replies

Userlevel 4
Badge +30

Hi @spiderman​ 

 

I created a Workspace that replacer the ( ):

 

Attribute_ 

Please, see the Workspace attached.

 

Thanks in Advance,

Danilo

Badge +3

Hi @spiderman​ 

 

I created a Workspace that replacer the ( ):

 

Attribute_ 

Please, see the Workspace attached.

 

Thanks in Advance,

Danilo

Thanks .ur idea is simple and really good .

but I have at the same attribute ,

as example street name 12 (gfsjj dhl) or

street name (fhjk)

I would like to keep the values before parentheses

and remove parentheses and the rest .

so Output will be street name 12 instead of street name 12 (gfsjj dhl)

How could I achieve it ?

Userlevel 4
Badge +30

Thanks .ur idea is simple and really good .

but I have at the same attribute ,

as example street name 12 (gfsjj dhl) or

street name (fhjk)

I would like to keep the values before parentheses

and remove parentheses and the rest .

so Output will be street name 12 instead of street name 12 (gfsjj dhl)

How could I achieve it ?

Hi @spiderman​ 

 

If you want to delete word with parentheses, you can use this Workspace attached.

Workspace_1 

Thanks in Advance,

Danilo

Reply