pb 获取两个字符串之间的内容

$PBExportHeader$gf_getfirstinfo.srf
global type gf_getfirstinfo from function_object
end type
forward prototypes
global function string gf_getfirstinfo (string as_source, string as_bef, string as_aft)
end prototypes
global function string gf_getfirstinfo (string as_source, string as_bef, string as_aft);//算法描述从字符串中获取两个字符串间的内容
string ls_rtn
string ls_bef
string ls_aft
string ls_bef_after//DT = '后面的字符串
long ll_pos1,ll_pos2
ls_bef=lower(as_bef)
ls_aft=lower(as_aft)
as_source=lower(as_source)
ll_pos1=pos(as_source,ls_bef)
if ll_pos1>0 then
ls_bef_after=mid(as_source,ll_pos1 + len(ls_bef),len(as_source) - ll_pos1 - len(ls_bef))
ll_pos2=pos(ls_bef_after,ls_aft)
ls_rtn=mid(ls_bef_after,1,ll_pos2 - 1)
end if
return ls_rtn
return ls_rtn
end function
原文地址:https://www.cnblogs.com/kuailewangzi1212/p/2236463.html