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 New Line Blank O...
Power Automate
Answered

Regex New Line Blank Output

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

Both of these work on all regex builders but not in Pad (reading a simple string from a text file).

(?<=Shipping\sDate\n).+

(?<=Shipping\sDate[\r\n]).+

 

Shipping Date
13/10/2000

 

Any help appreciated 😊

 

Screenshot 2022-02-20 201716.png

 

 

I have the same question (0)
  • Verified answer
    josephb61 Profile Picture
    65 on at

    @UK_Mike 

    The PAD regular expression actions use the .Net Regular Expression Engine, so you need to use syntax matching that dialect of regular expression syntax.
    That said you syntax should have worked, unless as I suspect you have extra whitespace, before the the CRLF.

    The way I code this is as follows.  Try and let us know, if this works for you.

    (?<=Shipping\s+Date)(.|\n)+

  • josephb61 Profile Picture
    65 on at

    @UK_Mike 
    Also, when you use the Read Text File action - use into Single Text Variable option and suggest use Encoding: ANSI.

  • UK_Mike Profile Picture
    on at

    Hey Joe, that worked a treat 😀

    I treble checked for whitespace so yes my original should have worked.

    Added a bit as I didnt want to catch a new line, if any.

    I only used Regex Storm once or twice as there wasnt much help in the site.

    I mainly use Regexr which works great, I think where I came unstuck was the new line ( Java versus .Net )

    Below works on both Utf-8 and Ansi.

     

    Many thanks Joe 👍

     

     

     

    Screenshot 2022-02-21 122132.png

  • josephb61 Profile Picture
    65 on at

    So, not to need to depend on text following, you can also do below.

    (?<=Shipping\s+Date)(.|\n)+?\d+(\|-)\d+(\|-)\d+

     

  • UK_Mike Profile Picture
    on at

    Hmmmmmmmmmm....

    Not working 🤔

    More often than not I will know if any text below what I want but that would be excellent... 😁

     

     

    Screenshot 2022-02-21 143955.png

  • UK_Mike Profile Picture
    on at

    This works, room for improvement ?

     

     

    Screenshot 2022-02-21 145914.png

  • josephb61 Profile Picture
    65 on at

    @UK_Mike  
    I had my slashes in the wrong direction, they should have been forward slashes, as you discovered.

  • josephb61 Profile Picture
    65 on at

    Corrected syntax below  ....  should accept both formats of date separators (slash or dash)  1/12/2020  or 1-12-2020
    (?<=Shipping\s+Date)(.|\n)+?\d+(/|-)\d+(/|-)\d+

  • UK_Mike Profile Picture
    on at

    Not just me huh 😂

    Thats excellent.

    Cheers buddy, will add to my never ending cheat sheet 😀

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 612

#2
Valantis Profile Picture

Valantis 344

#3
11manish Profile Picture

11manish 326

Last 30 days Overall leaderboard