P
P
PartyZan822020-02-12 11:13:07
Regular Expressions
PartyZan82, 2020-02-12 11:13:07

Regex how to leave the last word in a string?

Tell me how to leave the last word in a line with a regular expression?
In EXCEL, I got it using the formula:
\u003d SUBSTITUTE (PSTR (RIGHT (" "& SUBSTITUTE (A2;" "; REPEAT (" "; 999)); 999 * 1); 1; 999);" "; "")
5e43b36e45742807688003.png

A Here's how to do it regularly, unfortunately I don't know...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2020-02-12
@fox_12

\s+(\S+)$
https://regex101.com/r/0jQ8Q4/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question