hai i tried yours.
but it is giving the same error:
wrong number of arguments to substr

i am using 8.1.7, does it have something to do with the error