I want to remove all text except the last 3 characters. So, for example if I have:
783223748foo
blahblahI\'m
sfdhello
It should become:
You may try the following find and replace:
Find:
^.*(?=.{3}$)$
Replace:
(empty string)
The pattern ^.*(?=.{3}$)$
matches the entire line, but will then pause before consuming the final three characters in the line. The lookahead (?=.{3}$)
ensures that the final three characters will not be replaced.