I\'m trying to find a regex for removing everything after the last dot in a file. So far I\'ve found ways to remove all text before the first dot, but I can\'t seem to find
Try following regex for search and replace
s/\.[^.]*$/\./
You can try something like:
\.[^.]*$
to match everything including and after the last dot. If you don't want to include the last dot, then you can use a positive lookbehind:
(?<=\.)[^.]*$