This lib worked pretty good for me so far, but now I've found an error.
This is the text:
Date 2017-01-01
Number 201701-19058-290719
mite. One activated user. Dec 01 Dec 31, 2016 4.20 Euro
Net 4.20 Euro
(
[year] => 2001
[month] => 01
[day] => 17
)
It should get the first line, 2017-01-01, instead it gets the invoice number, 201701-19058-290719, which your script tries to convert into a date.
Could you improve your reg-ex? Or at least return "all dates" inside the array? So I could iterate trough the array and make a DateTime isValid() check until I find the right date?
This lib worked pretty good for me so far, but now I've found an error.
This is the text: Date 2017-01-01 Number 201701-19058-290719 mite. One activated user. Dec 01 Dec 31, 2016 4.20 Euro Net 4.20 Euro
It should get the first line, 2017-01-01, instead it gets the invoice number, 201701-19058-290719, which your script tries to convert into a date.
Could you improve your reg-ex? Or at least return "all dates" inside the array? So I could iterate trough the array and make a DateTime isValid() check until I find the right date?