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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Parse Text Not Working...
Power Automate
Answered

Parse Text Not Working With Regex

(0) ShareShare
ReportReport
Posted on by 44

POWER AUTOMATE DESKTOP
I'm trying to get the borrower's name ("TEST NAME") from this text (%NewInput%) using the Parse Text action and the Regex expression:
(?<=AND\n).*
However the parse text is returning nothing as a match with position -1. 

 

Tuesday, 12 July 2020
LOAN AGREEMENT
THIS LOAN AGREEMENT (this "Agreement") dated this Tuesday, 12 July 2020
BETWEEN:
FAKE COMPANY
ajkbsdfjlbasjildfuiasbduifbasipdbf
(the "Lender")
OF THE FIRST PART
AND
TEST NAME
[PHOTO ID ADDRESS LINE 1]
[PHOTO ID ADDRESS LINE 2]
(the "Borrower")
OF THE SECOND PART
IN CONSIDERATION OF the Lender loaning certain monies (the "Loan") to the Borrower, and the Borrower 
repaying the Loan to the Lender, the parties agree to keep, perform, and fulfil the promises and conditions....

 

JoeF___0-1657600277081.png

JoeF___1-1657601613592.png

 

The regex works exactly as intended in regex101, capturing the next line of text after the AND\n.
All examples for power automate desktop I've seen haven't included any flags or open/close characters on the regex string. I'm sure its something small but It's driving me insane.

Categories:
I have the same question (0)
  • AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at

    @JoeF__  Could you please try below:

    Ankesh_49_0-1657603695777.png

     

    Hope it helps!!

     

    Cheers,

    Ankesh

    --------------------------------

    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • JoeF__ Profile Picture
    44 on at

    no change, still not finding anything

    JoeF___0-1657605222707.png

     

  • AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at

    @JoeF__ %NewInput% it has below text in it?

    Tuesday, 12 July 2020
    LOAN AGREEMENT
    THIS LOAN AGREEMENT (this "Agreement") dated this Tuesday, 12 July 2020
    BETWEEN:
    FAKE COMPANY
    ajkbsdfjlbasjildfuiasbduifbasipdbf
    (the "Lender")
    OF THE FIRST PART
    AND
    TEST NAME
    [PHOTO ID ADDRESS LINE 1]
    [PHOTO ID ADDRESS LINE 2]
    (the "Borrower")
    OF THE SECOND PART
    IN CONSIDERATION OF the Lender loaning certain monies (the "Loan") to the Borrower, and the Borrower 
    repaying the Loan to the Lender, the parties agree to keep, perform, and fulfil the promises and conditions....

     

  • AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at

    @JoeF__ Try below, see if it solves your purpose

    Ankesh_49_0-1657608225026.png

     

    Ankesh_49_1-1657608299302.png

     

  • JoeF__ Profile Picture
    44 on at

    The text is pulled from a form, so name is going to change, but it will always be in the same position in the text. I want to pull whatever the name is, to use it elsewhere. Searching for specific text is not what I'm looking for. The name I'm trying to pull will always be on the 10th line, and the line before will always be AND\n.

  • AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at

    It will always be caps?

  • JoeF__ Profile Picture
    44 on at

    yes indeed

  • AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at

    @JoeF__ 

    I have created a regex (?<=AND)[^[]* considering match text after 'AND' and before '['

    Ankesh_49_0-1657685855685.png

    Ankesh_49_1-1657685899072.png

     

    Hope it helps!!

     

    Cheers,

    Ankesh

    --------------------------------

    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

     

     

  • Verified answer
    JoeF__ Profile Picture
    44 on at

    Found a suitable regex finally: (?<=AND\r\n).*(?=\r\n)
    Turns out text extracted from a PDF using:

    JoeF___0-1657761036874.png

    uses \r\n for new lines, which I only discovered by playing with:

    JoeF___1-1657761164017.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 339 Super User 2025 Season 2

#1
trice602 Profile Picture

trice602 339 Super User 2025 Season 2

#3
David_MA Profile Picture

David_MA 270 Super User 2025 Season 2

Last 30 days Overall leaderboard