Page 1 of 1

Malformed addresses

Posted: 08 May 2022 11:09
by quarlton
I have a friend who has entered addresses without comma separators.
All entries are in the Place field

e.g. 31 Charles Street Cheadle Cheshire England

I could easily add a comma before each space, unfortunately this fails with the street part.

31, Charles, Street, Cheadle, Cheshire, England

Does anyone have a suggestion as how I could handle this?

Thanks

Re: Malformed addresses

Posted: 08 May 2022 12:15
by davidf
Progressively use the Search and Replace feature to replace:
"Street" with "Street," (and road and lane etc - hope fully not "st" - which could be "saint")
"Cheshire" with ", Cheshire," etc

David

Re: Malformed addresses

Posted: 08 May 2022 13:37
by tatewise
Do NOT edit Place fields. Do NOT use Edit > Find and Replace... commands.
Those methods will play havoc with the Place records.

I suggest you use the Search and Replace plugin to initially replace each space with a comma and space.
See https://pluginstore.family-historian.co ... me_changes and follow the Global Change Example advice.
You will need to select the Part Words option.

Then continue to use the plugin to correct special cases like the following as you discover them:
, Street becomes Street
, Road becomes Road
etc.

Re: Malformed addresses

Posted: 08 May 2022 14:21
by quarlton
Thanks to DavidF and Mike

Managed to do a good chunk of it without too much effort.

Is there an 'append' option at all?
Ideally I would like to add 'England' on to the end.

If this results in some 'England, England' that's easy to fix.

Thanks again

Re: Malformed addresses

Posted: 08 May 2022 15:45
by tatewise
Yes, but needs LUA Pattern Mode enabled and you need to understand LUA Patterns as explained in the Help & Advice.

Search: (.+)

Replace: %1, England

(.+) where .+ matches any character multiple times and ( ) captures that.

%1, England where %1 applies the captured text and , England appends itself.

Re: Malformed addresses

Posted: 08 May 2022 16:02
by quarlton
Thanks Mike,

That works a treat (why am I not surprised).

I always struggle with LUA/GREP pattern matching for anything beyond the basic.