I think you can also do this(See Below). You need the customer name length
right? Please correct me if I am wrong. Thank you.
rule "Wild Character validation"
when
c : CustomerInfo(n:customerName != "");
then
int l = n.length();
int ch = 0;
int i = 0;
for (i = 0; i < l; i++) {
if (data.charAt(i) != "*"|| data.charAt(i) != "#"){
continue;
}
ch++;
data.setCharAt(i, "");
}
c.setCustomerName(data);
end
--
View this message in context:
http://drools.46999.n3.nabble.com/Removing-Special-Characters-tp3628821p3...
Sent from the Drools: User forum mailing list archive at
Nabble.com.