Regular Expression in Informatica

am using below to capture the last word of a given string:
REG_EXTRACT(EMER_CONTACT_NAME,('.*(\w+)\s(\w+)'),2)
The value(s) returned is as expected, it is the last word in the string prior to the last instance of whitespace.  What I need is a way to extract the entire string just prior to the last word as a return value.  Below only provides the first word prior to the first \s:
REG_EXTRACT(EMER_CONTACT_NAME,('(\w+)\s+.*(\w+)'),1)
I need to find a way to find the entire string to include additional \s just prior to the last word.  Pleased if someone could assist who knows Informatica well as regex does not always play by the same rules in transformations.

Thanks
LVL 1
gNomeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cwiedmannCommented:
Have you tried REG_EXTRACT(EMER_CONTACT_NAME,('(.*)(\w+)'),1)?

I'm not an Informatica expert, but this seems to match what you're describing better from a regex point of view.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gNomeAuthor Commented:
Outstanding help - thank you
0
gNomeAuthor Commented:
Thanks again
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.