web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Unanswered

Split and extract words from a sentence

(0) ShareShare
ReportReport
Posted on by 70

Hi,

 I have a text sentence called: This is the users FirstName LastName. Now I want extract the Last two words from the sentence and store them in variables, say varFirstName and varLastName. The sentence would keep changing but for any input text/sentence, I want to get the last two words and store them as separate variables. Using Last(Split()) function as power fx in automate, I was able to get the Last word, but where I am struck is at, to get the last before word.

 

Please could anyone help me on this?

 

Thanks.

I have the same question (0)
  • Chriddle Profile Picture
    8,359 Super User 2025 Season 2 on at
    Re: Split and extract words from a sentence
    reverse(
    	take(
    		reverse(
    			split(
    				'This is the users FirstName LastName.',
    				' '
    			)
    		),
    		2
    	)
    )

     

    Chriddle_0-1709806592670.png

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 535 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 348 Moderator

#3
developerAJ Profile Picture

developerAJ 262

Last 30 days Overall leaderboard