replace regexp with String#end_with?