Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find All Email Address present in each line.

Hi All

I want to find all the email address present in each and every single line.

This is what i need:

Find number of Emails from String.png

Is there any way around for such requirement.

I have tried Index(), Textbetween() and Findoneof() functions but no Luck.

I have attached the Sample Data Source.

Regards

Eric

11 Replies
alexandros17
Partner - Champion III
Partner - Champion III

The idea is :

1) look for the position of @ sympol (use index() function)

2) find the last space before and the first after @ (you can use substringcount to count number of spaces before @ symbol then with the function Findoneof you can find the position of the last space)

3) With mid function extract the string

Let me know ...

zhadrakas
Specialist II
Specialist II

Hello Eric,

you can use this to identify the rows with an Email Address.

wildmatch( [Column_Name], '*@*.*') as FLAG_EMAIL

but ist very hard to get the E-Mail out of this string with internal Qlik functions. (even when there are multiple Emails in one row)

i would recommend to look for another tool/way to achieve this.

Gysbert_Wassenaar

I'm pretty sure gabrielking123@5@gmail.com is not a valid email address. Perhaps "gabrielking123@5"@gmail.com would be. For this kind of this you really want regular expressions: How to Find or Validate an Email Address

But you can try this:

LOAD
    Column_Name,
     
Part,
     
Subfield(Trim(Part),' ',1) as Email
WHERE
     
SubStringCount(Part,'@') and SubStringCount(Part,'.') ;
LOAD     
    Column_Name,
   
[Desired Result],
   
SubField(subfield(Replace(Column_Name,'<-',''),':',-1),'>') as Part
FROM
      [Email Address from String - Data Source.xlsx]
      (
ooxml, embedded labels, table is Sheet1)
      ;


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Sir

The Code is Running but there are problems in some cases.

I have attached my QVW.

Gysbert_Wassenaar

You could remove the troublesome string first: Replace(@1,'>>??@@@SADSSDFSDV', '') as Column_Name


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

by using the replace function it is implemented

Not applicable
Author

not working.

is there any way using index() or textbetween()

Gysbert_Wassenaar

Not working? Show me. It works fine here.


talk is cheap, supply exceeds demand
Not applicable
Author

Is there any way which doesn't includes Hard Coding.