Skip to main content

I have an address field with an address value of 1244 Deep Creek Road

I want to use the AttributeSplitter to separate this value in a List so it comes out like this

List{0} = 1244

List{1} = Deep Creek

List{2} = Road

 

My question:

What delimiter do I need to use that would split the 1244 into a separate list, but keep the "Deep Creek" together in List{1}? (Note that there are other streets with two names, I use "Deep Creek" as an example)

Hi @timh​,

The AttributeSplitter is not sophisticated enough to do that type of separation, but the StringSearcher can do it it using Regular Expressions. Please try the StringSearcher with the following Settings:

Screen Shot 2023-01-31 at 4.03.02 PMThe Regular expression to use is:

(Â0-9]+) ((?:\w+ )+)(\w+$)

This will result in a list of three parts, with the first part being the street number, the last part being the last word, and the middle part being all the words between the other two.

The Regular Expressions are very powerful for this sort of splitting. There is great RegEx experimentation site that I use a lot at https://regexr.com/.


Hi @timh​ 

 

I simulated here using Regex to get firt integer elements:

 

Workspace_Integer_1 

 

Thanks in Advance,

Danilo


Reply