SETP
asked on
Extracting a number
I need to write a subroutine in VB.NET 2003 which extracts numbers from a string (they will always be nonnegative integers). It must only extract numbers at the end of the string.
Examples:
=======
abc123 -> 123
123abc456 -> 456
123abc456def789 -> 789
123 -> 123
123abc -> nothing
abc123d -> nothing
abc -> nothing
Is there anything built into VB.NET 2003 that can do that? If not, can anyone show me the best way of implementing this subroutine?
Thanks
Examples:
=======
abc123 -> 123
123abc456 -> 456
123abc456def789 -> 789
123 -> 123
123abc -> nothing
abc123d -> nothing
abc -> nothing
Is there anything built into VB.NET 2003 that can do that? If not, can anyone show me the best way of implementing this subroutine?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER