Groovy script:
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {
//Body
def body = message.getBody(java.lang.String);
//message.setBody(body);
def num = body.replaceAll("[^0-9]", "")
message.setProperty("num",num)
return message;
}
Input: 43645fdggtshf
Output: num: 43645
No comments:
Post a Comment