Could you extract to a local variable at least the substring statement ?

Thx ;)