cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cs024
Frequent Visitor

Extract string from filename

hi there,

 

I was hoping someone can help me with an expression I can use to extract a string that is located within a filename.

 

For example, if the filename is JohnSmith_23_ABC_Hello.pdf, I'd like it to extract "ABC".

The location of "ABC" may not always be in the third position. 

Basically, I'd like it to "find" either the word "ABC" or "ABD" and if found, extract that and put it in a column (column is in a list)

I'm having problems finding an expression that will find out if the filename has an "ABC" or "ABD" :(.

 

Please help and thank you.

J

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @cs024,

 

Here is an action named Condition, you could use it to check if filename contains ABC or ABD:Screenshot 2021-04-28 133503.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-litu-msft
Community Support
Community Support

Hi @cs024,

 

Here is an action named Condition, you could use it to check if filename contains ABC or ABD:Screenshot 2021-04-28 133503.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

cs024
Frequent Visitor

Thank you for your help. I guess I can do the check using a condition control. I was hoping I wouldn't have to nest conditions and use an expression instead but this should work. 

 

Thank you! 🙂

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,137)