Painting Blue Code
Simple, self-explanatory code snippets.
2011-09-13
VBA - Remove string leading zeroes using a regular expression
Public
Function
fStringLeadingZeros(str
As
String
)
As
String
Dim
re
As
Object
Set re = CreateObject(
"VBScript.RegExp"
)
re.pattern =
"^0+"
fStringLeadingZeros = re.Replace(str,
""
)
Set re =
Nothing
End
Function
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment