1

I am trying to build the logic in informatica to fetch the email id from free text using reg_extract but its not working as expect.I have tried using this logic [a-zA-Z0-9-.]+@[a-zA-Z0-9-.]+[a-zA-Z].Can someone please help with this.

Input:

Data storing in column is string within that email ids are present. Need to fetch email ids.There is no fixed pattern. Example :

Field 1 
test – test12 – test@gmail.com - test1@gmail.com    
abc - abc@gmail.com - abc1@gmail.com - abc2@gmail.com
ghi-ghi@gmail.com-ghi1@gmail.com-ghi2@gmail.com
-jkl-jkl@gmail.com-jkl1@gmail.com-jkl2@gmail.com
cde  cde@gmail.com
Comment generated by:Please contact : efg@gmail.com for any queries

Output:

Field 1
test@gmail.com/test1@gmail.com 
abc@gmail.com/abc1@gmail.com/abc2@gmail.com
ghi@gmail.com/ghi1@gmail.com/ghi2@gmail.com
jkl@gmail.com/jkl1@gmail.com/jkl2@gmail.com
cde@gmail.com
efg@gmail.com
Sak
  • 61
  • 6

1 Answers1

0

If you read the doc on REG_EXTRACT cerefuly, you will notice it does not perform extracts of multiple occurences of some given pattern. What it rather does, is it lets you split the whole string into array and extract one element.

I'm afraid it's not simple and the only possible way might be by using multiple variable ports. If at all possible.

Maciejg
  • 3,088
  • 1
  • 17
  • 30