Skip to main content
Solved

Convert text from .dwg file.

  • June 3, 2021
  • 2 replies
  • 55 views

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 👍

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

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

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