Comparison | function
Function cpimages (countent) ' shows the picture in the article
Beginstr=instr (countent, "src=")
Heodinstr=instr (Beginstr,countent, "")
Countent=mid (countent,beginstr+4,heodinstr-beginstr-4)
Cpimages=countent
End Function
Function Cutstr (Str,strlen)
' Remove all HTML tags
Dim RE
Set re=new REGEXP
Re. IgnoreCase =true
Re. Global=true
Re. Pattern= "< (. [ ^>]*) > "
Str=re. Replace (str, "")
Set re=nothing
Dim L,t,c,i
L=len (str)
T=0
For I=1 to L
C=abs (ASC (str,i,1))
If c>255 Then
T=t+2
Else
T=t+1
End If
If T>=strlen Then
Cutstr=left (str,i) & "..."
Exit for
Else
Cutstr=str
End If
Next
Cutstr=replace (CUTSTR,CHR (10), "")
Cutstr=replace (CUTSTR,CHR (13), "")
Cutstr=replace (CUTSTR,CHR (32), "")
End Function
The first one to extract the path to the first picture in a passage.
The second function, on the contrary, can be used to get rid of the HTML tags in the article