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: 
Anonymous
Not applicable

URL Address

Hi,

Please help me with idea.

I have different website' urls like this http://www.name.org/site/lookup.asp?c=9iLOK7PJKfI2G&b=6229577.

I want to keep only name.org.

I replace in load scrypt

Replace(Replace(Replace(Replace(Replace(SITE, 'http://',''),'http:/',''),'http:www.',''),'https://',''), 'www.','')  as ...

I get name.org/site/lookup.asp?c=9iLOK7PJKfI2G&b=6229577

How can I replace or remove other info after org?

Thanks,

25 Replies
Anonymous
Not applicable
Author

No, didn't work it.

Could you explain what you do? maybe I find something what I need.

Cheers

Anonymous
Not applicable
Author

Sorry, It works. I need only check the results.

If they match.

Thank you so much!!!

Could you explain what you did?

Regards,

MayilVahanan

Hi

      if(SubStringCount(Tested,'_')>1, Left(Tested,Index(Tested,'_'))&SubField(t2,'_',2), SubField(Tested,'/',1)&'_'&SubField(Tested,'_',2)) as Finalize

just split the domain and concat with the numbers in the site path.. I used your expression to replace the http:// , www:// and so on. Used if condition because, in some url appears like name.org/some_htm_1234, so for in this case want to take the second '_' part..

Hope you understand the concept.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Load *, if(SubStringCount(Tested,'_')>1, Left(Tested,Index(Tested,'_'))&SubField(Client1,'_',2), SubField(Tested,'/',1)&'_'&SubField(Tested,'_',2)) as Client;

Load *,if(SubStringCount(Client1,'_')=2,SubField(Client1,'/',1)&'/_'&SubField(Client1,'_',3), SubField(Client1,'/',1)&'/_'&SubField(Client1,'_',2)) as Tested Resident T1;

I understand that.

Why do you load twice?

MayilVahanan

Hi

     Its take the Tested value and modify it..

     Edit:

     Did you get the result?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Only tomorrow.