can anybody tell me if there is any built in service which we can call and give it a string input while it gives me the last four digits of that string as output.
string input :- filename:0001
i just need the number out of it ,
and the input string is the file name which i get from a polling directory.
pub.flow:getTransportInfo, to get the file name.
If you string has ( always in the filename as you mentioned use pub.string:tokenize (set delmiter :)then extract the index from valueList output map it to a new string gives 0001
You can use a combination of two built-in services to achieve your goal. Lets say your input string is in the variable named “filename”. First use pub.string:length to get the length of the filename in a variable “len”, then use pub.string:substring to get the last 4 chars of the filename. When using the substring service map your filename to the inString, len-4 to beginIndex and len to endIndex.