I have a variable my_variable with value as a dynamic URL like --
http://stackoverflow.com/questions/ask
I want to do a substring on this dynamic URL to find the string after last "/" i.e. in case above mentioned URL, I want to get the substring "ask"
How can I use MEL to do that?
You can use the string functions which are availalbe from the java.lang package.
#[flowVars['my_variable'].substring(flowVars['my_variable'].lastIndexOf('/'))]
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With