python strip non numeric in string

Do you want to know the details regarding “python strip non numeric in string”. If yes, you’re in the correct post.

python strip non numeric in string

>>> import re
>>> re.sub("[^0-9]", "", "sdkjh987978asd098as0980a98sd")
'987978098098098'

Final Thoughts

I hope this post helps you to know about “python strip non numeric in string”. If you have any questions regarding this post please let us know via the comment section. Share this tutorial with your friends and family via social networks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coder Diksha. Here, I post about programming to help developers.

Share on:

Leave a Comment