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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
cwiedmannConnect With a Mentor Commented:
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
 
gNomeAuthor Commented:
Outstanding help - thank you
0
 
gNomeAuthor Commented:
Thanks again
0
All Courses

From novice to tech pro — start learning today.