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 Platform Community / Forums / Power Automate / Split and extract word...
Power Automate
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.

Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,416 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard