Skip to main content
Question

Regex to qualify the attributes of shape file and copy them to appropriate fields


dilipsebastian
Forum|alt.badge.img
I am working with ESRI shape files and the data in on of the attribute field in my existing dataset is a mix of information that needs to qualified and segregated into atleast 4 new attribute fields. I hope using regular expressions would be the best way to accomplish this task. I donot have too much experience wotking with FME and I was hoping to see if anyone here has a workspace that you used for somethjng similar that I could refer to . Any help in this is appreciated as all I have now is the regular expressions that will help me qualify the data.

6 replies

pratap
Contributor
Forum|alt.badge.img+11
  • Contributor
  • July 21, 2015
Hi,

 

 

Question is too generic for me... :)

 

 

What do you mean by "mix of information" and what are "4 new attribute fields" you expect???

 

 

Could you please explain with an example atleast to understand better...

dilipsebastian
Forum|alt.badge.img
Am working on an address dataset. The address number field in the current dataset contains address number, subaddress info, lot numbers, etc. I am planning to qualify them and put in seperate fields.

pratap
Contributor
Forum|alt.badge.img+11
  • Contributor
  • July 21, 2015
1. address number

 

2. subaddress

 

3. lot number

 

are present in single attribute field?

dilipsebastian
Forum|alt.badge.img
Exactly. They all are present in a single attribute field now.

pratap
Contributor
Forum|alt.badge.img+11
  • Contributor
  • July 22, 2015
If you have any delimiter then use "AttributeSplitter", else if you are confident of number of characters then use "SubstringExtractor".

 

 

Hope this will help

dilipsebastian
Forum|alt.badge.img
Thanks for the replies. By the way, I got it working  yesterday by chaining up StringSearcher with Substring Extractor and then to AttributeCopier.

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