web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get only digit ...
Power Automate
Answered

How to get only digit value from a string

(1) ShareShare
ReportReport
Posted on by 67
Hi all,
 
My use case for example -
if text variable value is FBLN123456
I want an output as 123456 
 
the string value can anything it's not fixed, the main purpose is to get all digit value from end.
 
I have the same question (0)
  • Suggested answer
    Vish WR Profile Picture
    3,748 on at
     
    This formula extracts the number from the very end of a text string
     
    first(match(variables('YourTextVariable'), '\d+$'))
     
    Vishnu WR
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
  • Suggested answer
    Ellis Karim Profile Picture
    12,163 Super User 2026 Season 1 on at
     
    If the string always starts with 4 text characters, you can use the slice function as shown in the examples below:
    slice('FBLN123456',4)
    slice(variables('text'),4)
    These examples remove the first four characters of the string and keeps everything from index 4 (after the 4th character) to the end of the string. @Vish WR there is no match function in Power Automate or native Regex support in Power Automate.
     
    Another method: If you want to extract the numbers from any string see: How to Extract Numbers from a String Using Power Automate
     
    The example below demonstrates the slice function, which returns "123456" because it removes the first four characters and keeps everything from index 4 to the end:
     
     
    Ellis Karim
    Ellis Karim
    elliskarim.com  |  LinkedIn  |  Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
  • NA-03061633-0 Profile Picture
    67 on at
    @Vish WR where to use this expression , i am using power automate desktop , tried this expression in set variable but did not get any result
  • Ellis Karim Profile Picture
    12,163 Super User 2026 Season 1 on at
    Sorry, I seems to have missed the tag for Power Automate desktop. I blame my new computer use glasses!
  • Suggested answer
    Haque Profile Picture
    3,653 on at
     
    I understand it is in PowerAutomate Desktop.  If your string pattern and format is as given in the example (FBLN123456) , Get subtext action might be an option.  
     
     
    OUTPUT
     
     
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • NA-03061633-0 Profile Picture
    67 on at
    @Haque as mentioned string and position is not fixed 
  • Vish WR Profile Picture
    3,748 on at
  • Verified answer
    Haque Profile Picture
    3,653 on at
     
    Please try Parse text action to achieve this like below:
     
     
    Test case-1:
     
     
    Test Case-2:
     
     
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard