$text = join($1, grep(/[^hello]/, split(/(\n)/, $text))); [download]
In reply to Re: end of line anchor in regex by sh1tn in thread end of line anchor in regex by redss