Replace of unknown character
Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3554
Printed Date: 29 March 2026 at 4:30pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Replace of unknown character
Posted By: michael
Subject: Replace of unknown character
Date Posted: 15 June 2003 at 11:02am
I am using the following syntax to get the full name via ADSI:
Set objrep = GetObject("WinNT://mydomain/" & Trim(rep)) rep = Replace(objrep.FullName,"A-","")
|
You see in the second line I am replacing A- with a blank thus my problem is, the prefix of the Full Name is not necessarily A- it is a location code like A- for Atlanta S- for Scottsdale etc. Sure I could iterate throug all locations currently present but I am hoping to find a solution to do a generic replace of whatever- to a blank. Anyone has an idea?
------------- http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker
|
Replies:
Posted By: michael
Date Posted: 15 June 2003 at 11:11am
Forget it, by just writing it out here it came to me, should start to think before I write LOL. I can just get the very left carachters with like: Set objrep = GetObject("WinNT://mydomain/" & Trim(rep)) loccode = left(objrep.FullName,2) rep = Replace(objrep.FullName,loccode,"")
------------- http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker
|
|