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

regex to extract a specific set of numbers

aristosv

Member
I need a regular expression to extract a specific set of numbers from a string. The string could contain letters, special characters and spaces.

Input examples:

Code:
This is a test 99 12 3456
This is test 2 94123456
This is test 3 357 95123456
This is test 4 35797123 456
And so on…

The regex should look for a string of at least 8 or 11 numbers starting with 357 or 94 or 95 or 96 or 97 or 99, followed by 6 or 8 more numbers.

Eventually the correct string output will be one of the following (without the <>):

Code:
94<6 more numbers here>
95<6 more numbers here>
96<6 more numbers here>
97<6 more numbers here>
99<6 more numbers here>


35794<6 more numbers here>
35795<6 more numbers here>
35796<6 more numbers here>
35797<6 more numbers here>
35799<6 more numbers here>

Thanks for your help
 
P

Pabblymember11

Guest
Hey @aristosv

Pabbly Connect has an action called "Text Formatter by Pabbly: Extract Pattern" to extract the pattern on the basis of given Regex as shown below. You can consider using this for your case -

1648884954350.png


I have tried at my end but, couldn't provide you with the exact pattern. I would recommend you checking the below links for generating the desired Regex and use it in the above action step.


 
Top