Skip to main content

Notifications

Power Automate - Using Flows
Unanswered

How to use RegEx connector in MS Flow

Posted on by

Hi, 

 

I am trying to setup RegEx connector in my MS Flow. 

 

My incoming source to RegEx connector is an email and in there it contains this string as part of the body.

 

<span style="background: yellow">82</span></b></p>

 

And i am trying to extract 'yellow' from it

so I tried this 'regular expression 

<span style="background: (\s+)">82</span></b></p>

 

background:(\s+)

 

Can you please tell me how can I solve my problem?

 

Thank you.

Sam

 

 

  • Suggested answer
    Matkje Profile Picture
    Matkje 22 on at
    How to use RegEx connector in MS Flow
    Hey
     
    You can extract it by specifying a starting and an end point of the text and get everything in between. Like so:
     
    (?=Starting point) .* (?=End Point)
     
    That get's everything in between the two specified points. It's elaborated on here, if you are interested:
     
     
    Best regards
    Mathias Kjeldsen
     
    ---
    If this has helped solve your problem, please mark it as an helpful answer. 

    Connect with me on social platforms by using the links below.
    YouTube: https://www.youtube.com/@matkjeldsen 
    LinkedIn: https://www.linkedin.com/in/mathiaskjeldsen/
  • v-yamao-msft Profile Picture
    v-yamao-msft on at
    Re: How to use RegEx connector in MS Flow

    Hi @scheu,

     

    I am afraid that RegEx has not been supported currently, I have seen a similar request on Flow Ideas Forum, please vote the idea at here:

    https://powerusers.microsoft.com/t5/Flow-Ideas/Support-for-regex-either-in-conditions-or-as-an-action-with/idi-p/24768

     

    About your scenario, do you want to extract the color of the background from the body of the email?

     

    If yes, please try with WDL functions. The following thread could be your reference, please check it at here:

    https://powerusers.microsoft.com/t5/General-Flow-Discussion/Microsoft-Flow-and-regex/td-p/118367

     

    If you need more help, please feel free post back.

     

     

    Best regards,

    Mabel Mao

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard

Featured topics

Restore a deleted flow