re = /[\s](rs|price)?([\s.]*\d+[\s\d.]*)(pkg|k|(?:la(?:c|kh|k)|crore|cr)s?|l)[\s.] /m
str = '65 lac this is 55 lac. and more price 100 lac. randome text to test price45 crs. and 65 cr and to test its matching rs 3244 k like rs 55k. to its matchibg 65 cr. but not 65 cr als not matching price 123 lac more of it 55 crs.
'
# 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