path - Regex check if a file has any extension -
i looking regex test if file has extension. define as: file has extension if there no slashes present after last ".". slashes backslashes.
i started regex
.*\..*[^\\]
which translates to
.* char, number of repetitions \. literal . .* char, number of repetitions [^\\] char not in class of [single slash]
this test data (excluding ##, comments)
\path\foo.txt ## want capture line \pa.th\foo ## regex captures line <-- problem here \path\foo ## line correctly filtered out
what regex this?
Comments
Post a Comment