Cut text by symbol

Remove text before or after a chosen symbol or substring.