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 / Regex with Long sentence
Power Automate
Answered

Regex with Long sentence

(0) ShareShare
ReportReport
Posted on by 90

Hi, 

I am trying to extract using parse text action to extract the sentence. But PAD is extracting only the first sentence. 

Example:

Text: Archibald Anderson, an able artist, and an acknowledged authority at all artistic assemblies after adventuring abroad all about Australia and America, and acquiring an admirable album artistically arranged, according as an accomplished artist accounted apt and appropriate, and admired amazingly among all artists as artistic and amusing, again, alleging as actuation an assiduous and absorbing activity, and an ambition all athirst after artistic accomplishments, and aiming at advantageous achievements, arranged another adventure across Asia, and accordingly appointing an accommodating and agreeable acquaintance, an affable Anglo-American, as agent.

 

In the parse text I am giving Regex   (?<=Text:).*

But it is extracting only the first sentence. I need to extract all the sentence. Please help. Thanks in advance.

I have the same question (0)
  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @DN1 

     

    Could you please elaborate your use case please? The text which is mentioned in the above is looks like normal text only then why you want to parse it? Please explain your use case in detail? And also share sample text which you want to parse exactly and what is your expected output from that?

     

     

  • eetuRobo Profile Picture
    4,579 Super User 2026 Season 2 on at

    But it is extracting only the first sentence. I need to extract all the sentence. 




    Isn't that just one long sentence? Do you mean its extracting only the first row? Is that text in multiple rows or one string without line breaks?
    Try this regex that includes line breaks: (?s)(?<=Text:).*

  • DN1 Profile Picture
    90 on at

    Hi @eetuRobo ,

    Thank you for your response. I mean it is extracting only the first row. 

    Eg:

    Firstname: John              Lastname: Test1

    DOB: 7/8/24                    City:  Sun

    Applied Skills:    Targeted validation for real-world scenarios. Skill up for in-demand technical scenarios to demonstrate proficiency in specific, scenario-based skill sets so you can make a bigger impact on every project, at your organization, and in your career.

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

    Firstname:  Joe             Lastname: Peter

    DOB:  4/5/35                  City:  Moon

    Applied Skills:    Targeted validation for real-world scenarios. Skill up for in-demand technical scenarios to demonstrate proficiency in specific, scenario-based skill sets so you can make a bigger impact on every project, at your organization, and in your career

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

    I need to extract Applied skills  text value using Parse text action "Regex". If I use the Regex (<=Applied Skills:).* 

    It is extracting only the first row. I need all the 3 rows to be extracted. If i use (<=Applied Skills:)(?S) then it is extracting all the values including next person's Data.(Firstname, Lastname, DOB, City, Applied Skills) . Please help!

     

    My output should be  : Targeted validation for real-world scenarios. Skill up for in-demand technical scenarios to demonstrate proficiency in specific, scenario-based skill sets so you can make a bigger impact on every project, at your organization, and in your career

     

     

  • eetuRobo Profile Picture
    4,579 Super User 2026 Season 2 on at

    Try this regex:
    (?<=Applied Skills:\s*)[^-]*(.*)

  • DN1 Profile Picture
    90 on at

    Hi @eetuRobo , 

    Thanks for your response. Now it is extracting all the 3 rows. But the output is coming with dotted lines.

    Output:

    Targeted validation for real-world scenarios. Skill up for in-demand technical scenarios to demonstrate proficiency in specific, scenario-based skill sets so you can make a bigger impact on every project, at your organization, and in your career ------------------------------------------------------------------------------------------------------------------

  • Verified answer
    eetuRobo Profile Picture
    4,579 Super User 2026 Season 2 on at

    Weird. For me it doesn't take those dashes. I used the example you gave:

    eetuRobo_0-1712606242394.png

    Regexstorm: http://regexstorm.net/tester

    eetuRobo_1-1712606273346.png


    Is the text exactly as you gave before or something bit different? 
    or is the ------ end not after linebreak but right after the text?
    like so:

    eetuRobo_2-1712606628470.png

    Maybe try this: (?<=Applied Skills:\s*)[^-]*(.*?)(?=-{2,}\s*|$)

    You can try using chatgpt to ask it to give you regex you want and test it with regexstorm

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 293 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 186 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 144 Super User 2026 Season 2

Last 30 days Overall leaderboard