re = /^(К?[0-9\s]+).*?Ламінат\s([\w\s()\/.]+|Х Galaxy 4V)\s([\p{L}\s.']+)/m
str = '4590 Ламінат Fiori Aqua Zero Дуб Iris фаска (1,67 м2)/5 шт
'
# Print the match result
str.scan(re) do |match|
puts match.to_s
end
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Ruby, please visit: http://ruby-doc.org/core-2.2.0/Regexp.html