I have a 'relative-filename' parameter in a Spring Integration Message Header.
It could be formatted like
"/tmp/frodo/files/pending/whatever.xml" or "/tmp/wilfred/files/completed/new/another.xml"
The portion before "files" can be of variable length...
I was using an expression like:
headers['relative-filename'].substring(11,) to get the part of the string including and after "files" ("files" is always there) .... this works for "frodo", but not for "wilfred".
How do I get the part of the string after "files"?
Can one have a variable expression as the first index of the "substring" or is there a regex that will prune the first portion of the file?
Thanks for any ideas.