hankknight
asked on
JavaScript/REGEX: Remove Numbers from End of String
Using JavaScript, how can I remove all digits from the end of a string?
alert( zapTrailingNumbers('abc123') ) // should be "abc"
alert( zapTrailingNumbers('abc123xyz') ) // should be "abc123xyz"
alert( zapTrailingNumbers('abc0') ) // should be "abc"
alert( zapTrailingNumbers('abc123xyz2') ) // should be "abc123xyz"
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.
haha, snap!
ASKER
Wow, exactly the same answer only seconds apart! Peer affirmed. Thank you both.