This example extracts the URLs of all links to PDF files and displays them on the web page.


Sub Wsw_PreprocessPage(ByRef $sMem, ByRef $sStatusMessage, ByRef $iStatusCode)
   
   Dim $sl, $i, $sItem
   
   $sl = GetAllWildcardMatches($sMem, "<a *>")
   For $i = 0 To StringList_ItemCount($sl) - 1
      $sItem = StringList_GetItem($sl, $i)
      If Pos(".pdf", $sItem) > 0 Then
         $sMem = Replace($sMem, $sItem, $sItem + HtmlGetParam($sItem, "href"))
      End If
   Next
   
End Sub