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 / Parsing and extracting...
Power Automate
Answered

Parsing and extracting 16 digit numbers from text string using Flow

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello all, 

 

Looking for ideas if it's possible to use with current PA implementations of substring/split/trim etc functions.

 

There's a Flow with a query which keep querying database and return various values which are later stored into Sharepoint.

These outputs would be always random, but most times would contain 16-digit numeric values, for example:

 

Output 1:

Lorem ipsum dolor sit amet, consectetur [ 1234567890123456 adipiscing elit. 

 

Output 2:

Lorem ipsum dolor | 9876543210987654 |sit amet, consectetur adipiscing elit. 

 

Output 3:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. 

 

Output 4:

Lorem ipsum dolor  sit amet, consectetur adipiscing elit 5432109876543210. 

 

 

Providing such randomness, is it possible to build function which would parse these text stings and if there's 16 digit number encountered, it would parse and extract these values?  I assume that substring is not usable due to changing location of this number, what can be best next alterative? Thanks for any ideas!

 

 

 

 

 

Categories:
  • VictorIvanidze Profile Picture
    13,083 on at
  • vbbvbb Profile Picture
    Microsoft Employee on at

    Thanks @VictorIvanidze , I have seen that regex approach but it's not possible to use HTTP action in the environment due to security reasons -- but also in this example it's unnecessary as , technically, SPO actions in Flow return most of outputs in JSON, so can try to couple that with Parse JSON and see if it would get results. I have discarded that approach earlier but maybe worth giving a try to modify.  

  • VictorIvanidze Profile Picture
    13,083 on at

    Alternatively you can use a "brute force" approach - find the first digit in the body and check if the next symbol is also a digit iteratively.

  • Verified answer
    vbbvbb Profile Picture
    Microsoft Employee on at

    Solved with this approach/script : https://www.tachytelic.net/2021/04/power-automate-regex/ , it's way more simple and allow Regex \d{16} filter without need to use HTTP connector.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 355

#2
11manish Profile Picture

11manish 336 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard