SOLVED
Use RegEx to extract name from a string that contains NAME + ADDRESS
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
gurpreet-singh
7 - Meteor
‎02-19-2019
02:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I have a few strings like:
- Mike Jason new port street 1345 adilli
- Sam Curran way walk park duncan valley
- Mike Jason P Fallon sweetcan valley
How can I use RegEx to extract just name "Mike Jason" & "Sam Curran" & "Mike Jason P Fallon"
Can some one please help?
Solved! Go to Solution.
Labels:
- Labels:
- Help
- Topic of Interest
1 REPLY 1
ACE Emeritus
‎02-19-2019
03:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If you can guarentee the casing as per your examples:
TRIM(REGEX_Replace([Input], "^(([A-Z][a-z]* ){1,}).*?$", "$1", 0))
should get the names (assumes just alphabet characters in names you may need to widen and all start with capital)
It is relying on the fact that names start with a capital letter and it will stop at the first word which doesn't.
Sample attached.
