Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Leading Zeros


I have this UDF that provides leading zeros and it works but only if the source field contains only numerical data. I want it to provide leading zeros even if there are some alphabetical data in it i.e 66V01342.

My current rule is: if (myString.matches("[0-9]*"))

(I thought that "*" would do it but it doesn't.


Former Member
Former Member replied


I hope u r giving like this

if (myString.matches("\[0-9a-zA-Z\]*")) // [ ] are present with in the string.....

What exactly u need to check in the if condition.. can u plz give the exact requirement....

What is exactly ur UDF Requirement


Edited by: hlbabu123 on Apr 8, 2010 2:29 PM

Edited by: hlbabu123 on Apr 8, 2010 2:31 PM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question