Hi,
I have an URL of the format : https://www.google.com/<unique_id>_<fileName>_<remaining url>
Now my requirement is I want to fetch the filename out of the URL ... the first part will always remain the same i.e.
first is https ... till .com/
then comes an unique identifier
then followed by '_'
then followed by filename
then followed by '_' and the remaining URL
Can anyone help me fetch the filename ?
Discussion posts and replies are publicly visible
Hi Gautam, below described logic will work for you.
a!localVariables( local!temp: split( "https://www.google.com/<unique id>_testFile_Second_<remaining url>", "_" ), local!file: if( length(local!temp) > 3, joinarray( a!forEach( items: local!temp, expression: if( contains({ 1, count(local!temp) }, fv!index), null(), fv!item ) ), "_" ), local!temp[2] ), local!file )
Thanks