Skip to main content
Solved

Convert text from .dwg file.


sorinduru

Greeting. I have a file from autocad (.dwg) from which I would like to extract the postal address numbers in the form: NR.20, NR.16a, NR.83

I would like to remove from the column special characters such as: ???, / , or - as well as text names like TEREN VIRAN

For example I have NR-130-TEREN-VIRAN, I wish to have just NR.130

Or: from NR-137/F I wish to have NR.137F

FMEAll the best.

 

Best answer by caracadrian

One way to do it is to use AttributeSplitter with Delimiter set to "-" folowed by ListExploder, Tester set to Contains Regex "\\d" and a StringReplacer to get rid of the "/".

expode textexploded textYou can concatenate NR. back by any method you like: AttributeCreator, AttributeManager, StringConcatenator, etc.

Am atasat si un workspace care face partea explicata 👍

View original
Did this help you find an answer to your question?

2 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • Best Answer
  • June 3, 2021

One way to do it is to use AttributeSplitter with Delimiter set to "-" folowed by ListExploder, Tester set to Contains Regex "\\d" and a StringReplacer to get rid of the "/".

expode textexploded textYou can concatenate NR. back by any method you like: AttributeCreator, AttributeManager, StringConcatenator, etc.

Am atasat si un workspace care face partea explicata 👍


sorinduru
  • Author
  • June 3, 2021
caracadrian wrote:

One way to do it is to use AttributeSplitter with Delimiter set to "-" folowed by ListExploder, Tester set to Contains Regex "\\d" and a StringReplacer to get rid of the "/".

expode textexploded textYou can concatenate NR. back by any method you like: AttributeCreator, AttributeManager, StringConcatenator, etc.

Am atasat si un workspace care face partea explicata 👍

Thank you very much!

I modified the script as needed here and there and it works great. Thank you very much!

All the best!2021-06-03_121438 

 

 


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