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 / Advanced Wildcard stri...
Power Automate
Unanswered

Advanced Wildcard strings in Find/Replace - this is just over my head

(0) ShareShare
ReportReport
Posted on by

Hi Community, 

Here's real challenging one.

 

How can I use "find" to locate the situations in a document where all of the following conditions are met:

 

- a word or series of words follows a slash 

- the word or series of words must not be followed by a comma
AND any one of the following 4:

- the word or series of words must end at (and not include) any parenthesis

- the word or series of words must end at (and not include) any numeral

- the word or series of words must end at (and not include) any bold text

- the word or series of words must end at (and not include) a space followed by a hyphen

I assume it's nearly impossible to meet all of the 4 lower conditions in one single command, and that's fine if so.

Here's a sample of the text I'm working with:

 

CELEBRITY  1 (n. famous person)  supa dupa/supa dupa,  suup/supe   2 (n. small-time celebrity; locally popular person)  staar bwai/star bwoy,  staar gyal/star gyal 
CHALLENGE  tes X fi/tess X fi,  seh X fi/seh X fi  (X=person)

 

What I hope to accomplish is to be able to find the cases like "/supe" and "/star gyal" and "/seh X fi" and then delete them.

Highest respect to anyone who knows how to do this sort of thing.
Eric

Categories:
  • Jay-Encodian Profile Picture
    2,922 on at

    Hi @EricDR 

    I'm not sure you can do this with the standard Microsoft Power automate connectors... The Encodian connector provides a 'Search and Replace Text' action which allows you to search both DOCX and PDF document replacing matches with desired text.

    You can use Regex search queries which would allow you to locate the strings confirming to your criteria and then replace them...

    https://support.encodian.com/hc/en-gb/articles/360020937853-Search-and-Replace-Text 

    The slight glitch... you have to provide a replacement string currently, however I know there is an update being shipped in the next few weeks which will allow you pass a null string... effectively deleting any matches.

    HTH

    Jay

     

  • efialttes Profile Picture
    14,756 on at

    Hi!

    As @Jay-Encodian explains, something that can be done in just a few minutes via regex can take hours to make it work with WDL functions, lol.

     

    Just in case your requirements does not allow to use third party connectors:

    Can you store your document in a string variable?

    If so, I think we have some chances to overcome the challenge by means of split() function. Assuming you got your document stored on a variable called 'myDocument', I would suggest to start with:

    split(variables('myDocument'),'/')

    Then you will need to combine it with some other WDL functions to reach your goal:

     

    My humble suggestion:

    1.- confirm if you can store document in a string variable

    2.- provide successful examples from each of the 6 conditions

     

    Hope this helps

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard