Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I have a scenario to get the word beween particular characters.
ex: community\qlik\demo.com
I need to retrieve "demo" from the above string. How i can achieve this??
Thanks in advance
In brief .., i need the word after last occurance of '\' [slash]
=subfield(subfield(String, '\' ,-1),'.',1)
use index to find the position of \ and .
and then mid to retrieve the string
Hi Praful, you can get that with:
=Subfield(SubField(TextField, '\', -1), '.', 1)
Or
=Left(SubField(TextField, '\', -1), Index(SubField(TextField, '\', -1), '.', -1)-1)
Will return the text between the last '\' and the last '.'. If the last word has a dot before the last .xxx it will the the entire word, ie:
community\qlik\eu.demo.com --> returns eu.demo
=Subfield(SubField(TextField, '\', -1), '.', 1) will return only 'eu'
=TextBetween('community\qlik\demo.com','\','.',2)
Hi There,
To really keep it dynamic I would use the following:
=TextBetween('community\qlik\demo.com','\','.',SubStringCount('community\qlik\demo.com','\'))
Hope it helps.