[thelist] Anal String Replace (ASP)

Steve Lewis nepolon at worlddomination.net
Thu Oct 14 13:50:20 CDT 2004


Rob Smith wrote:

> I have a file name:
> filename = "Abbrv. State Names.htm"
> 
> What I'd like to do is:
> filename = replace(filename,".","")
> 
> However this yields:
> Abbrv State Nameshtm... not good

// something like this works nicely
prefixLength = [position of LAST occurance of "." in string] + 1;
substring = substring( 0, prefixLength )
replace( substring, ".", "")

Most string libraries have a findLastOccurance sort of functionality. 
  I havn't done ASP in three years and cannot remember what it 
supports anymore.

HTH

-- 
Steve Lewis


More information about the thelist mailing list