Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Parsing the last occurrence of a string pattern

Some sample strings:

1) www.abc.com

2) xyz.com

3) www.123.com/page.pdf

4) www.123.com/section/secondpage.html

I would like to be able to find the last period in the string and take all of the data after that period.  So the results would be:

1) com

2) com

3) pdf

4) html

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

use subfield function:

subfield (<Your string field>, '.', -1)

View solution in original post

3 Replies
Anonymous
Not applicable
Author

use subfield function:

subfield (<Your string field>, '.', -1)

swuehl
MVP
MVP

Try something like

subfield(SAMPLESTRING, '.', -1)

Anonymous
Not applicable
Author

Thanks, I did not realize that there was a -1 option!  Works great.