Reputation: 5
str = "The is the end of line" how to search for the last word "line" in the above string fusing batch script.
Upvotes: 0
Views: 1806
Reputation: 37569
Try this:
@echo off &setlocal
for %%i in (The is the end of line) do set "TheEnd=%%i"
echo(%TheEnd%
Upvotes: 1