He wants the last instance of the pattern in the file. It might not at the very end of the file.
As for speed, (?s:.*) jumps right to the end of the file. (?s:.) matches anything, so no check needs to be made (and none is done).
In reply to Re^3: Matching Regular expression at EOF
by ikegami
in thread Matching Regular expression at EOF
by krish28
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |