Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem extracting string

Status
Not open for further replies.

fabien

Technical User
Sep 25, 2001
299
AU
Hi,

To solve the problem on my recent post I need to do the following:

I have a string that contains an html link which can be external:
i.e "or internal:
"/data/toto/titi/index.html#Get"

I thought I would use # to differentiate between the two so
1) test if there is a # in the string
2) if not it is an external link
3) if yes then I want to extract the #Get part

What is the best way to do this?


Thanks,
 
I solved this by using:

set parts [split $link #]
set match [lindex $parts end]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top