Module: ReceiptDataExtraction
- Defined in:
- lib/reg_exp.rb,
lib/receipt_data_extraction.rb
Defined Under Namespace
Classes: Extract, Specific_data
Constant Summary collapse
- Name_reg =
/\n/- Date_reg =
/(\s(?<day>(\d{1,2}))(\s|\/|\-)(?<month>((\d+)|(#{month_1})|(#{month_2})))(\s|\/|\-)(?<year>(\d{2,4}))\s+)/- Product_reg =
/((#{quantity})\s+)?#{item_name}\s*#{price}(\s*#{price_total})?/- Negative_values =
/(€|EUR)?\-(?<price>(\d{1,3}\,)*\d{1,3}\.\d{2})/- Total_reg =
/(\s*(\btotal\b)|(\bTotal\b)|(\bTOTAL\b))\D*\s*(?<amount>(\d{1,3}\,)*\d{1,3}\.\d{2})/- Clean_text =
/.*?(?=#{Total_reg})/