MRT find last word in a sentence

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
edwsora
Junior Member
Junior Member
Posts: 2
Joined: 2023-12-06, 10:50 UTC

MRT find last word in a sentence

Post by *edwsora »

Hello everyone!

I'm trying my best to find the correct formula to find the last word in a sentence, using regular expressions in MRT but without success.

Can anyone help me in this direction?

I was unable to find any threads on this topic.

Thank you!
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: MRT find last word in a sentence

Post by *white »

Something like this:

Code: Select all

(\w+)\W*$

☐ [E]  ✅ RegEx 
$1 holds your last word.
edwsora
Junior Member
Junior Member
Posts: 2
Joined: 2023-12-06, 10:50 UTC

Re: MRT find last word in a sentence

Post by *edwsora »

Yes, it works! Thank you!
Post Reply