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.

View solution in original post

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
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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,076)