Skip to main content
Solved

How to normalize house numbers using Regular Expression?

  • May 4, 2018
  • 2 replies
  • 35 views

Forum|alt.badge.img

Hello FME masters,

I have a set of housenumbers I'd like to update. I'm trying RegEx but not getting the result I want.

What it boils down to:

HaveWant1-A1A22-2422

First example: I'd like to clean out the dashes but keep the letter following the dash.

 

Second example: Clean out the dash and any digits following it.

 

How can I do this in the StringReplacer?

Thanks,

 

Ed

Best answer by denizturan1985

Hello Ed,

You can use the expression below and replace with nothing.

(?<=\d)\-\d*

0684Q00000ArLh2QAF.jpg

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.

2 replies

denizturan1985
Participant
Forum|alt.badge.img
  • Participant
  • 11 replies
  • Best Answer
  • May 4, 2018

Hello Ed,

You can use the expression below and replace with nothing.

(?<=\d)\-\d*

0684Q00000ArLh2QAF.jpg


Forum|alt.badge.img
  • Author
  • 60 replies
  • May 4, 2018

Hello Ed,

You can use the expression below and replace with nothing.

(?<=\d)\-\d*

0684Q00000ArLh2QAF.jpg

Hi @denizturan1985,

 

 

Thanks! - that tHERE did the trick nicely. ;-)

 

 

Cheers,

 

Ed