Match €-symbol
This commit is contained in:
parent
4b3a8e6e45
commit
5735323619
|
@ -5,4 +5,4 @@ This project contains different PDF parsers for my personal use. Feel free to co
|
|||
### Caruna Invoice Parser
|
||||
PDF parser to parse Caruna invoices.
|
||||
|
||||
Usage: ``./gradlew :caruna-invoice:run /path/to/pdf``
|
||||
Usage: ``./gradlew :caruna-invoice:run --args="/path/to/pdf"``
|
Binary file not shown.
|
@ -25,10 +25,10 @@ import java.util.regex.Pattern;
|
|||
public class Parser {
|
||||
|
||||
private static final Pattern DATE_RANGE_PATTERN = Pattern.compile("(\\d\\d?\\.\\d\\d?\\.\\d\\d\\d\\d) - (\\d\\d?\\.\\d\\d?\\.\\d\\d\\d\\d)");
|
||||
private static final Pattern PERUSMAKSU_PATTERN = Pattern.compile("Perusmaksu.* (\\d*,\\d\\d) EUR");
|
||||
private static final Pattern P_SIIRTO_PATTERN = Pattern.compile("Päiväsiirto.* (\\d*,\\d\\d) snt.* (\\d*,\\d\\d) EUR");
|
||||
private static final Pattern O_SIIRTO_PATTERN = Pattern.compile("Yösiirto.* (\\d*,\\d\\d) snt.* (\\d*,\\d\\d) EUR");
|
||||
private static final Pattern TAX_PATTERN = Pattern.compile("Sähkövero.* (\\d*,\\d\\d) EUR");
|
||||
private static final Pattern PERUSMAKSU_PATTERN = Pattern.compile("Perusmaksu.* (\\d*,\\d\\d) (EUR|€)");
|
||||
private static final Pattern P_SIIRTO_PATTERN = Pattern.compile("Päiväsiirto.* (\\d*,\\d\\d) snt.* (\\d*,\\d\\d) (EUR|€)");
|
||||
private static final Pattern O_SIIRTO_PATTERN = Pattern.compile("Yösiirto.* (\\d*,\\d\\d) snt.* (\\d*,\\d\\d) (EUR|€)");
|
||||
private static final Pattern TAX_PATTERN = Pattern.compile("Sähkövero.* (\\d*,\\d\\d) (EUR|€)");
|
||||
|
||||
private static final Locale FI_LOCALE = new Locale("FI", "fi");
|
||||
private static final DateTimeFormatter FI_DATE = DateTimeFormatter
|
||||
|
|
Loading…
Reference in New Issue