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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,915)