class SomeController
def asin_params
# comma or semicolon, optionally surrounded by whitespace
# or
# two or more whitespace characters
# or
# any number of newline characters
String(params[:asins])
.split(/ \s*[,;]\s* | \s{2,} | [\r\n]+/x)
.select { |item| item.length > 8 }
.map(&:upcase)
end
end