UK Address Regex Expression in Blue Prism
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 09:29 AM
Hello - I am currently dealing with address validation where I have to compare two addresses and check if they match.
The complex part is that the addresses can have the word 'St' in one address and 'Street' in another - but it still needs to be considered a match. Below is an example of such a scenario. Please let me know if you guys have any ideas on how to get around this problem. Using this expression (?<=Address: )....
Scenarios:
71 Cherry St
SOUTHAMPTON
SO53 5PD
71 Cherry Street
Southampton SO53 5PD
England
Please let me know if you have any questions. Thanks in advance!
------------------------------
Brittany Harding
------------------------------
The complex part is that the addresses can have the word 'St' in one address and 'Street' in another - but it still needs to be considered a match. Below is an example of such a scenario. Please let me know if you guys have any ideas on how to get around this problem. Using this expression (?<=Address: )....
Scenarios:
71 Cherry St
SOUTHAMPTON
SO53 5PD
71 Cherry Street
Southampton SO53 5PD
England
Please let me know if you have any questions. Thanks in advance!
------------------------------
Brittany Harding
------------------------------
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 01:10 PM
Hi @Brittany Harding
Have you tried using comparing the string loosely? E.g. InStr(Lower([Address]), "71 cherry st")>0
You could also do this based on the condition that the postcode matches, for example if the postcode is a match then you compare the street to make sure the house number is correct. So you could create the process to do a decision based on InStr(Lower([Address]), [PostCode])>0 and where true then you would compare the second part InStr(Lower([Address]), "71 cherry st")>0
------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------
Have you tried using comparing the string loosely? E.g. InStr(Lower([Address]), "71 cherry st")>0
You could also do this based on the condition that the postcode matches, for example if the postcode is a match then you compare the street to make sure the house number is correct. So you could create the process to do a decision based on InStr(Lower([Address]), [PostCode])>0 and where true then you would compare the second part InStr(Lower([Address]), "71 cherry st")>0
------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 01:46 PM
Hi Brittany,
Thank you for being a SS&C Customer and for using Blue Prism.
It sounds like you have more of a regex issue than a Blue Prism issue. After a quick refer to my favourite regex site I found this collection that may help you. https://regexlib.com/Search.aspx?k=street&AspxAutoDetectCookieSupport=1
Take a look and if you still have questions, come back to me and I will see what else I can find to help.
regards
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Thank you for being a SS&C Customer and for using Blue Prism.
It sounds like you have more of a regex issue than a Blue Prism issue. After a quick refer to my favourite regex site I found this collection that may help you. https://regexlib.com/Search.aspx?k=street&AspxAutoDetectCookieSupport=1
Take a look and if you still have questions, come back to me and I will see what else I can find to help.
regards
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 02:12 PM
Hi Brittany,
If it is a regex you are needing, try this. \d+[ ](?:[A-Za-z0-9.-]+[ ]?)+(?:Avenue|Lane|Road|Boulevard|Drive|Street|Park|Ave|Dr|Rd|Blvd|Ln|St|Pk)\.?
You can add in any others you need to match against.
Hope this helps.
regards
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
If it is a regex you are needing, try this. \d+[ ](?:[A-Za-z0-9.-]+[ ]?)+(?:Avenue|Lane|Road|Boulevard|Drive|Street|Park|Ave|Dr|Rd|Blvd|Ln|St|Pk)\.?
You can add in any others you need to match against.
Hope this helps.
regards
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 02:32 PM
That is exactly what I am looking for. I need to Extract the following below (name, address and telephone have been changed and used as an example) to a Collection nothing seems to work for me.
------------------------------
Brittany Harding
------------------------------
FORD CLAYS MEDICAL CENTRE
Address:
CRAMMDALE STREET
FORD CLAYS
GRAYS
ESSEX
RM16 2UJ
Telephone:
01375 800888
------------------------------
Brittany Harding
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 03:09 PM
Hi Brittany,
I am not sure if you still need help with this or not.
If you need a postcode regex, this is a bit hard to follow but pretty much catches all the bases including the old Girobank postcode which I don't think exists anymore as it was sold to Santander, but here goes.
^(?:(?:[A-PR-UWYZ][0-9]{1,2}|[A-PR-UWYZ][A-HK-Y][0-9]{1,2}↵
|[A-PR-UWYZ][0-9][A-HJKSTUW]|[A-PR-UWYZ][A-HK-Y][0-9]↵
[ABEHMNPRV-Y])●[0-9][ABD-HJLNP-UW-Z]{2}|GIR 0AA)$
I haven't tried but it might work if you remove the |GIR 0AA bit near the end. This was the Girobank postcode of years ago.
If you need something to match phone numbers you might want to peruse the offerings on regexlib
https://regexlib.com/Search.aspx?k=uk%20telephone
Thank you for using Blue Prism
regards
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
I am not sure if you still need help with this or not.
If you need a postcode regex, this is a bit hard to follow but pretty much catches all the bases including the old Girobank postcode which I don't think exists anymore as it was sold to Santander, but here goes.
^(?:(?:[A-PR-UWYZ][0-9]{1,2}|[A-PR-UWYZ][A-HK-Y][0-9]{1,2}↵
|[A-PR-UWYZ][0-9][A-HJKSTUW]|[A-PR-UWYZ][A-HK-Y][0-9]↵
[ABEHMNPRV-Y])●[0-9][ABD-HJLNP-UW-Z]{2}|GIR 0AA)$
I haven't tried but it might work if you remove the |GIR 0AA bit near the end. This was the Girobank postcode of years ago.
If you need something to match phone numbers you might want to peruse the offerings on regexlib
https://regexlib.com/Search.aspx?k=uk%20telephone
Thank you for using Blue Prism
regards
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 03:27 PM
This expression (?<=)([A-Z]+[\n ]+[A-Z]+[\n ]*)([\n ]*[A-Z]+)* works for 'FORD CLAYS MEDICAL CENTRE' but the expression ^(?:(?:[A-PR-UWYZ][0-9]{1,2}|[A-PR-UWYZ][A-HK-Y][0-9]{1,2}↵
|[A-PR-UWYZ][0-9][A-HJKSTUW]|[A-PR-UWYZ][A-HK-Y][0-9]↵
[ABEHMNPRV-Y])●[0-9][ABD-HJLNP-UW-Z]{2}|GIR 0AA)$ for the
address. The link was helpful for the Telephone number THANK YOU!
------------------------------
Brittany Harding
------------------------------
|[A-PR-UWYZ][0-9][A-HJKSTUW]|[A-PR-UWYZ][A-HK-Y][0-9]↵
[ABEHMNPRV-Y])●[0-9][ABD-HJLNP-UW-Z]{2}|GIR 0AA)$ for the
address. The link was helpful for the Telephone number THANK YOU!
------------------------------
Brittany Harding
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 04:04 PM
Hi Brittany,
The regex example I sent you was for a postcode. Not an actual line of address, I really don't think you will manage a Regex to deal specifically with addresses. Also, this isn't actually Blue Prism, this is Regex or Regular Expressions. We just have a method of making use of them. They are a little obtuse to work with until you understand how the different parts work. If you want to learn regex you might want to take a look here, https://regexone.com/
I hope this helps you accomplish your goals.
regards
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
The regex example I sent you was for a postcode. Not an actual line of address, I really don't think you will manage a Regex to deal specifically with addresses. Also, this isn't actually Blue Prism, this is Regex or Regular Expressions. We just have a method of making use of them. They are a little obtuse to work with until you understand how the different parts work. If you want to learn regex you might want to take a look here, https://regexone.com/
I hope this helps you accomplish your goals.
regards
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 05:14 PM
Hi Brittany,
Here at Norfolk County Council we use a mix of two different sources for address validation, you may also be able to use this or something similar.
Rather than regex the address, we submit a query to Ordnance Survey containing the full address - https://osdatahub.os.uk/docs/places/technicalSpecification which then returns a list of addresses and also a "match" value, which can then be used to figure out if the address provided is a good match or not.
W also use postcodes.io for specifically postcodes as this service allows formatting for postcodes with spaces, or without and also uppercase / lowercase. It also returns some extended information about a postcode that Ordnance Survey does not return.
------------------------------
Jordan Harvey
Developer
Norfolk County Council
------------------------------
Here at Norfolk County Council we use a mix of two different sources for address validation, you may also be able to use this or something similar.
Rather than regex the address, we submit a query to Ordnance Survey containing the full address - https://osdatahub.os.uk/docs/places/technicalSpecification which then returns a list of addresses and also a "match" value, which can then be used to figure out if the address provided is a good match or not.
W also use postcodes.io for specifically postcodes as this service allows formatting for postcodes with spaces, or without and also uppercase / lowercase. It also returns some extended information about a postcode that Ordnance Survey does not return.
------------------------------
Jordan Harvey
Developer
Norfolk County Council
------------------------------
