I have a string where the words within are separated by periods, what would be the best way for returning the last word?
My guess would be to use string.gsub, but i'm having a hard time figuring out the correct syntax
here's an example:
str = "These.Are.A.Few.Words.But.I_only_want_this"
Desired output would be:
I_only_want_this
Note that i don't need to treat any magical characters as such, they can stay in the string no problems
Try:
.*- Match zero or more (*) of any character (.), taking the longest sequence possible.%.- Match a literal.character.Example: