Say I have a string: Hey what\'s up @dude, @how\'s it going?
Hey what\'s up @dude, @how\'s it going?
I\'d like to remove all the characters before@how\'s.
@how\'s
You can also directly call [] also on a string(same as slice)
[]
slice
s = "Hey what's up @dude, @how's it going?" start_index = s.downcase.index("@how") start_index ? s[start_index..-1] : ""