• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

Extract Pattern Wrong Pattern?

elonmusk

Member
hello,

i have a series of number as follow:
00004101
00023489
00134939

I would like to remove all leading zeros.
i have tried this \b0*([1-9][0-9]*)\b
but it doesnt work.

markuphero-5uMa7uMwivj7tZ5cTUS1.png


can somebody help?

thanks
 

ArshilAhmad

Moderator
Staff member
Please try using Code by Pabbly to run this Python code, which will help you remove the leading zeros.
1722538129805.png


Python:
import re

input_string = "0000007856560"
output_string = re.sub(r'^0+', '', input_string)
print(output_string)
 
Top