• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

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