Skip to main content
Question

Filter data


dienstgeografie

I have a esri feature class, and one of the columns (populations) contains values in different formats, all in text (1234 | 1,234 | 123 txt | 12 txt. 34 | <Null>).

I want all the values in a new integer field.

Is there anyone who can help me to get rid of the text and (1234).

2 replies

david_r
Celebrity
  • December 3, 2018

Try a StringReplacer in regular expression mode. Text to replace:

 ^([0-9,]+)

Replacement text:

\1

This will leave only the first digits + commas at the start of the attribute.

0684Q00000ArLIwQAN.png

If you want to get rid of the comma you can use a second StringReplacer and leave the Replacement text empty:

0684Q00000ArLHXQA3.png


redgeographics
Celebrity
Forum|alt.badge.img+50

I think a StringReplacer with this regex:

\(.+\)|\D

should do the trick. Replace the matches with nothing and you should be left with all digits as long as they're not between ()

Essentially the same as @david_r suggests, but in one go.


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