Java regex match Date separated with dots

By | July 12, 2018

I have following regex
and [\\d\\d\\.\\d\\d\\.\\d\\d].*
who both matches lines with dates correctly, but also match lines containing no date but only a number (and text).

My text format is like this:

12.04.18, 15:59 - A: xyz
12345 abc
12.04.18, 16:00 - B: cde
abc 12345

I want the regex to match line 1 and 3


Leave a Reply

Your email address will not be published. Required fields are marked *