cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CBHodgetts76
New Member

Remove lines from string with wildcard?

Hi All

I'm sure this has probably been asked many times before,  but I can't seem to find an answer, so am hoping that some clever genius might have an idea? I have a very long string, where the text [class="rp_rating">1</td><td width="524" ] may appear multiple times. But the >1< element can be any number, not just 1, so a simple replace will not work in all instances.  

 

Is there a way of removing all of these unwanted lines regardless of the number? Can the >1< be replaced with a wildcard or is there another way to get around this?

2 REPLIES 2
Paulie78
Super User III
Super User III

No easy way that I can think of. I would do a regex replace. I wrote an article on how to do this:

Regular Expressions in Power Automate 

Then you could use the regular expression:

[class="rp_rating">\d<\/td><td width="524" ]

Blog: tachytelic.net

YouTube: https://www.youtube.com/c/PaulieM/videos

If I answered your question, please accept it as a solution 😘

Hi @Paulie78 , thankyou for the suggestion - I'll certainly have a look at your suggestion, very much appreciated

 

Many thanks mate 👍

CBHodgetts76

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,361)