String Manip problem

Results 1 to 2 of 2

Thread: String Manip problem

  1. #1
    Join Date
    Dec 1969

    Default String Manip problem

    I&#039;m trying to modify the string below. I want to<BR><BR>1. Find the last instance of a <BR><BR> then<BR><BR> Find the first instance of @<BR><BR> keep everything between (not inclusive of the and the @<BR><BR><BR>........seeker4101412ER-1_A.pdf@er<BR><BR><BR>Is there a combination of trim, right left etc. My big issue right now is finding a character and then trimming to that point.

  2. #2
    Join Date
    Dec 1969

    Default InStrRev and then InStr

    &#060;%<BR>str = "........seeker4101412ER-1_A.pdf@er"<BR><BR>lastSlash = InStrRev( str, "\" )<BR>atSign = InStr( lastSlash, "@" )<BR>If lastSlash &#060; 1 OR atSign &#060; 1 Then<BR> Response.Write "Malformed"<BR> Response.End<BR>End If<BR>wanted = Mid( str, lastSlash+1, atSign-lastSlash-1 )<BR>%&#062;<BR><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