Test, validate and match regular expressions
This PCRE2 regex parses medication lines by capturing the drug name into named group 'nomemedicamento' and the dosage into 'concentracaomedicamento' (Portuguese for medication name and concentration). It matches text where a name is separated by periods or whitespace from a number optionally followed by a space and a unit (mg, cap/caps, or cx). With global and multiline flags, it's ideal for extracting entries from prescription lists like 'Paracetamol. 500mg' or 'Omeprazol 30 caps'.