CREATE DEFINER=`root`@`localhost` FUNCTION `getNum`(Varstring varchar(50)) RETURNS varchar(30) CHARSET utf8
BEGIN
DECLARE v_length INT DEFAULT 0;
DECLARE v_Tmp varchar(50) default '';
DECLARE s_len INT DEFAULT 0;
DECLARE e_len INT DEFAULT 0;
set v_length=CHAR_LENGTH(Varstring);
set s_len = v_length - 5;
set Varstring = right(Varstring,s_len);
set v_length=CHAR_LENGTH(Varstring);
set e_len = v_length - 18;
set Varstring = left(Varstring,e_len);
WHILE v_length > 0 DO
IF (ASCII(mid(Varstring,v_length,1))>47 and ASCII(mid(Varstring,v_length,1))<58 or ASCII(mid(Varstring,v_length,1))=46 or mid(Varstring,v_length,1)='万') THEN
set v_Tmp=concat(v_Tmp,mid(Varstring,v_length,1));
END IF;
SET v_length = v_length - 1;
END WHILE;
RETURN REVERSE(v_Tmp);
END