skip to Main Content

NEED INSIGHT: Using python I am using a regular expression to capture sample restaurant sales data to categorize and convert it to JSON from a .pdf

The regular expression I am using is ^s*(d+)s*(([A-Za-z]+s*)+)?(d+)s+(.+?)s+(d+.d+)s+(d+.d+)s+(d+.d+)s+(d+.d+)s+(d+.d+)s+(d+.d+)s+(d+.d+)s+(d+.d+)s+(d+.d+)$ When the following sample data string is parsed and categorized " 1 NA BEVERAGE 1100 ICED TEA 14.00 3.00 42.00 3.50 0.00 42.00 0.00 0.52 47.09" Output is incorrect: when you look…

Back To Top