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 / Split string by delimiter
Power Automate
Answered

Split string by delimiter

(0) ShareShare
ReportReport
Posted on by 18

Hi, I would like to split a string by a delimiter in order to get an email address to send some stuff attached. 

The title of files are like: example@email.com#120_2.pdf

I want to extract the text before "#"

Here's the flow I have so far:

 

em.PNG

Categories:
I have the same question (0)
  • eric-cheng Profile Picture
    5,171 on at

    Hi @lasher18 

     

    Try

     

    @first(split('example@email.com#120_2.pdf','#'))

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

  • lasher18 Profile Picture
    18 on at

    Ir returns an error. "The parameter 'To' cannot be empty".

    I put:  first(split(variables('Textosplit'),'#')) in 'To' when sending the email

  • Verified answer
    eric-cheng Profile Picture
    5,171 on at

    Hi @lasher18 ,

     

    I cant see your expression but you are spliting the variable you are initialising which would be empty.  Are you sure you are referencing the correct variable in the expression?  Assuming there is an actual value and its not null.

     

    Example below is using @first(split(variables('MyStr'),'#'))

     

    Screenshot_20210921-013305_Chrome.jpg

     

    Screenshot_20210921-013323_Chrome.jpg

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

  • lasher18 Profile Picture
    18 on at

    Thanks! It worked. Just one more thing please. How can I do the same for the second part of the string? The one after "#"

  • Verified answer
    eric-cheng Profile Picture
    5,171 on at

    Hi @lasher18 ,

     

    Same formula but replace first with last()

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard