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

Community site session details

Session Id : VoOUh3Fpdh2FBvxWw0U2wN
Power Automate - Building Flows
Answered

How to extract certain parts of a string

Like (0) ShareShare
ReportReport
Posted on 13 Jul 2022 11:13:25 by 100

Hello,

 

I have a string of that I've extracted from AI Build (modelExtract information from invoices) to Text.

I need to create an expression that pulls numbers which begin with "111" or "222".

Example String:

111523 o 78 i 23
Text Text 12 o a & #,
xyz abcdfgh 123
aaa bc 1 # , 222423
xyz 1
Text Text Text

Expected Result:

111523 222423

____________________________________________________________________________
How to build a compose so that I only got the 111... & 222... numbers?*
I tried split() Function but with that I was not able to solve this.

split(triggerBody()[‘text’],’111’) - with that I only separate the number 111 but I want to separate the whole number beginning with 111 (or 222).

Any ideas?
Thank you!

 

I have the same question (0)
  • shoog Profile Picture
    2,164 on 15 Jul 2022 at 06:19:11
    Re: How to extract certain parts of a string

    @ultrAslan Do you need further help on this?

    If the suggested solution is working as expected, then please mark it as solution accepted. This will help others in the community looking for solutions.

  • Verified answer
    shoog Profile Picture
    2,164 on 13 Jul 2022 at 11:24:07
    Re: How to extract certain parts of a string

    You can use the Filter array action. For the From argument: split(inputstring, ' ')

    for the filter condition

     

     

    <at>or(startsWith(item(), '111'), startsWith(item(), '222'))

     

    substitute <at> with the @ sign and inputstring with the output of the extract action.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 798 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 469 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 333

Last 30 days Overall leaderboard
Loading complete