← GalleryLLR_get_invoice_details✨ Emoji Combos/Subtotal\s{0,99}(?<Subtotal>\D\d+...)\s{0,99}(?=Tax)Tax\s{0,99}(?<Tax>\D\d+...)\s{0,99}S&H\s{0,99}(?<S_H>\D\d+...)\s{0,99}S&H\s{0,99}Tax\s{0,99}(?<S_H_Tax>\D\d+...)\s{0,99}Total\s{0,99}(?<Total>\D\d+...)|Subtotal\s{0,99}(?<Subtotal_notax>\D\d+...)\s{0,99}(?=S&H)\s{0,99}S&H\s{0,99}(?<S_H_notox>\D\d+...)\s{0,99}S&H\s{0,99}Tax\s{0,99}(?<S_H_Tax_notax>\D\d+...)\s{0,99}Total\s{0,99}(?<Total_notax>\D\d+...)/gJavaScript+07 years ago✓ Pre-loaded
About this regex
Extracts financial line items from invoice or receipt text, capturing Subtotal, Tax, Shipping & Handling (S&H), S&H Tax, and Total amounts. The regex handles two invoice formats: one with a separate Tax line before S&H, and another without. Each captured value expects a currency symbol followed by digits (e.g., $123.45). Useful for automated invoice processing and receipt data extraction.