Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
saumyashah90
Specialist
Specialist

Take last file/word of a URL

I have 1000's of different URL's

example

Input:

Header1

http://abc.ed.aea/file1/file2/file3/abc.svc,

http://sf.asda.afas/file1/bdf.asmx,

http://af.saf.fw/xyz,

http://adas.dasd.dasd/file1/file2/file3/file4/file5/file6/pqr.svc,

etc

Output Needed:

abc.svc,

bdf.asmx,

xyz,

pqr.svc,

etc

Request you to help me in that.

Header1 is a column from excel.

1 Solution

Accepted Solutions
MarcoWedel

SubField(Header1,'/',-1)

View solution in original post

7 Replies
MarcoWedel

SubField(Header1,'/',-1)

Anonymous
Not applicable

Take a look on the attached file.

Regards,

Gabriel

MarcoWedel

Hi,

one solution might be:

QlikCommunity_Thread_139560_Pic1.JPG.jpg

LOAD *,

    SubField(Header1,'/',-1) as LastSubField

Inline [

Header1

http://abc.ed.aea/file1/file2/file3/abc.svc,

http://sf.asda.afas/file1/bdf.asmx,

http://af.saf.fw/xyz,

http://adas.dasd.dasd/file1/file2/file3/file4/file5/file6/pqr.svc,

];

hope this helps

regards

Marco

its_anandrjs
Champion III
Champion III

One possible solution will be

Input:

LOAD Header1, SubField(Header1,'/',-1) as NewField;

LOAD * Inline

[

Header1

http://abc.ed.aea/file1/file2/file3/abc.svc,

http://sf.asda.afas/file1/bdf.asmx,

http://af.saf.fw/xyz,

http://adas.dasd.dasd/file1/file2/file3/file4/file5/file6/pqr.svc,

];

And you get

Subfield.png

Regards,

Anand

Not applicable

Hi,

subfield(Fieldname,'/',-1)

saumyashah90
Specialist
Specialist
Author

Hey Mac,

when i tried my self i got similar solution like:

=Subfield(Header1,'/', Substringcount(Header1,'/')+1)

But yours seems to be more optimal.Thanks....

MarcoWedel

You're welcome

regards

Marco