Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
in my automation i would like to extract a certain substring from a given string. The string is a path like this: 02_TRANSFORM/04_MARKETING/Leads.qvs and extract the last folder from the path. In this case the string i want to extract is 04_MARKETING
I tried using a RegExParse() in an Output block: {regexparse: {$.loop3.item}, '.*\\([^\\]+)\\'}
Maybe RegEx is the right approach; maybe not...but i would appreciate any hint or advise.
Thanks!
Hi @xyz_1011 ,
Can you use the below expression in your formula to extract the substring?
'/.*\/(.*)\/(.*)$/'
Please find the attached screenshot which helps. Let me know if this solution works for you.
Thanks
...so i found a regex that does what i need (tested in regex101):
.*\/([^\/]+)\/
but in my automation it fails:
any idea, why ?
Hi @xyz_1011 ,
Can you use the below expression in your formula to extract the substring?
'/.*\/(.*)\/(.*)$/'
Please find the attached screenshot which helps. Let me know if this solution works for you.
Thanks
If the normal Qlik functions are available the above request should be solvable with normal string-functions like subfield() or textbetween().
@marcus_sommer I would love this....as an old-school-qv-nerd, some of what i try to do in automations would then be doable in no time 🙂