HELP PLEASE: Extract from a string

Results 1 to 2 of 2

Thread: HELP PLEASE: Extract from a string

  1. #1
    Join Date
    Dec 1969

    Default HELP PLEASE: Extract from a string

    I have a series of links, including the HTML tags, embedded in various records of a database table column. For example, the column for one record may contain the following:<BR>&#060;A HREF="../content/test/test.txt"&#062;test&#060;/A&#062;<BR><BR>Is there any way to extract the contents of the HREF attribute (in this example: ../content/test/test.txt) and list them, given that the contents of the string (and, therefore, the string&#039;s length) keep changing for each record?<BR><BR>Any help would be most appreciated!<BR><BR>Regards, Mitchell

  2. #2
    Eddie Campbell Guest

    Default RE: HELP PLEASE: Extract from a string

    Assuming that your data is reasonably consistent (there are " marks around the href, this would work.<BR><BR>Response.Write Mid(b,InStr(1,b,chr(34))+1,(InStr((InStr(1,b,chr(3 4)))+1,b,Chr(34))-InStr(1,b,chr(34)))-1)<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts