Willing to keep only last chunk of words containing a dot (still keeping words not containing pattern):
sed seems to only match last word:
$ echo "Here this.is.a.start is a very.nice.String that.is.the.end yes " | sed 's/.*[ ]\([^ ]*\.\)\([^ ]*\)[ ].*/\2/g'
end
$ echo "Here this.is.a.start is a very.nice.String that.is.the.end yes " | sed 's/.*[ ]\([^ ]*\.\)\([^ ]*\)[ ].*/\1/g'
that.is.the.
how should I do to get this result ? :
echo "Here this.is.a.start is a very.nice.String that.is.the.end yes " | sed s\\\g
Here start is a String end yes