I want to search for all lines that:
- start with a numeric repeat (one or several times) which is not followed by dot and a whitespace character
Given Lines
1. TEST 1 : DataLogFile
11. TEST 2 : Inter Citro File
111. TEST 3 : Inter Citro File
111.TEST4 : Match this
Expected Result
Matched only last line
111.TEST4 : Match this
Regex
I try with regex ^[0-9]+(?!. ).* to match normaly only the last row because there is no whitespace character after the dot.
Tested in Regex101
Actual Result
Matched 3 last lines
11. TEST 2 : Inter Citro File
111. TEST 3 : Inter Citro File
111.TEST4 : Match this
[EDIT]
When I try the SaSkY response, it will only match lines that have digits after dots after no blank characters.
I try to delete dot after digits it will not match.
Expected Result :
111.TEST4 : Match this
111TEST4 : Match this
>Solution :
Try this:
^\d+(?:\.\S|[A-Z]).*
^start of the line.\d+one or more digits.\.literal dot.\Sany character except a whitespace character..*zero or more characters.
See regex demo