Find JPG/GIF in Text

Category: Strings

Date: 03-28-2012

Return to Index


 
Function PBMain()
   Local temp$, iLen,iPos As Long
   temp$ = "abc http://www.garybeene.com/images/pb_0100.jpg def http://www.garybeene.com/images/pb_0101.gif ghi http://www.garybeene.com/images/pb_0102.jpg"
   Do
      iPos = iPos + iLen
      RegExpr "\shttp.*\.(jpg)|(gif)" In temp$ At iPos To iPos, iLen
      If iPos Then ? Mid$(temp$,iPos,iLen)
   Loop While iPos
   Beep
End Function
 
'gbs_00532
'Date: 03-10-2012


created by gbSnippets
http://www.garybeene.com/sw/gbsnippets.htm