The error message is quite clear:
There are more or less parameters than allowed for the function
instr
.
Have a look at the function documentation:
MySQL :: MySQL 5.7 Reference Manual :: 12.5 String Functions[
^]:
instr
requires two parameters.
But you are passing three here:
set v_last = instr('>',p_htmldesc,instr('<',p_htmldesc));
[EDIT]
You probably want to use
set v_first = instr(p_htmldesc, '<');
set v_last = instr(p_htmldesc, '>');
instead. Note also that the first parameter is the full string and the second the substring to be searched for. So you have to exchange the parameters compared to your code.
[/EDIT]