Reverse regex search for "$" matches at start position