My data is something like this: abc: words I don't want | words I want abc: remove these | more words I want abc: drop this | A few more important words abc: not these | Yes these too abc: delete this | and these as well ... Can I build a substitution that will remove the beginning stuff up to the pipe and leave every thing else? I have tried some wild card things like: $line =~ s/abc:.+|//; but that does not work. Can it be done?