Welcome to WebmasterWorld Guest from 18.205.246.238

Forum Moderators: phranque

Message Too Old, No Replies

Need help with parsing

     

oogachaka

6:58 am on Jul 22, 2001 (gmt 0)

Inactive Member
Account Expired

 
 


hey everyone

Could someone please help me with parsing a string? Here is an example of what I have now:

Dim Selection
if instr(strOrigURL,"/applications/") >0 then
Selection = "applications"
intStart = instr(strOrigURL,"/applications/") + 14
intApplications = replace(mid(strOrigURL,intStart),"/","")

What I want to be able to do is pass in a link value of something like /applications/10.html, and then parse out the 10. The current code above would return 10.html

Any help would be greatly appreciated.

Thanks
Bob

7:57 pm on July 23, 2001 (gmt 0)

Junior Member

10+ Year Member

joined:July 20, 2001
posts:137
votes: 0


Something like this?

<script type='text/vbscript'>

folderName = "/applications/"
folderLength = len(folderName)
offset = instr(location.search, folderName)
if offset > 0 then
  fileName = mid(location.search, offset + folderLength)
  alert(fileName)
else
  alert("invalid file name")
end if

</script>

Bob1986

3:35 pm on July 30, 2001 (gmt 0)

Inactive Member
Account Expired

 
 


da h*ll is parsing?
3:43 pm on July 30, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member nffc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 22, 2000
posts:3604
votes: 0

oogachaka

4:02 pm on July 30, 2001 (gmt 0)

Inactive Member
Account Expired

 
 


I solved the problem. Sorry if you do not feel that I used the correct syntax. The term means to break into smaller pieces. i.e. I could parse /applications/10.html into

/applications/
10
.html