regex - How to check if there are doubles in the same line? -
i have text file many lines this:
img_0106.jpg y:\2004_05_23_bern basel\ 2004_05_23 img_0107.jpg y:\2004_05_23_dortmund\ 2004_05_23 img_0108.jpg y:\2004_05_25_paris\ 2004_05_24 img_0110.jpg y:\2004_05_25_paris\ 2004_05_25
i want check if there double dates in same line , not.
line 1,2,4 have date match.
line 3 doesn't have date match (2004_05_25 != 2004_05_24)
i know how find double lines don't know how find doubles in same line in case.
can please me?
this :g
command regex give lines duplicated dates, can operations on lines:
:g/\v(\d{4}_\d{2}_\d{2}).*\1
if want find them, (or highlight them hlsearch), /sameregex
Comments
Post a Comment