• 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.

  • Due to Diwali and Bhai Dooj celebrations, our team will have limited availability. While we’ll continue to monitor threads, responses may be slightly delayed. Normal operations will resume on Friday, 24th October 2025.

Text / Number formatter function

I have a requirement where I need to extract all the digits (only) from the input field's value while removing all spaces, signs, hyphens, emojis, etc. For example:

Input field value:
77 33 00 - 2013 🦢
77 33 00 - 3882
77 33 00 - 4013 Sold
*_77 33 88 - 1522
77 33 88 - 1987 🦢

The expected result should be:
7733002013
7733003882
7733004013
7733881522
7733881987

Could you please assist me in achieving this with Pabbly Connect? Any guidance or instructions would be highly appreciated.
 
P

Pabblymember11

Guest
Hey @deepak9780097800

You can make use of the "Code" action step to convert the phone number into a simple phone number.

function extractDigits(input) { // Remove spaces, signs, hyphens, emojis, and other non-digit characters const cleanedInput = input.replace(/[^\d]/g, ''); return cleanedInput; } const inputFieldValues = [ "77 33 00 - 2013 🦢" ]; const results = inputFieldValues.map(value => extractDigits(value)); console.log(results);

2023-08-08_16h58_34.png
 
Top