>>>Ed,
>>>
>>>>Oh, you'd just love to see the uncommented version of a block of code I wrote yesterday:
>>>>
>>>>
oRegExp = CREATEOBJ('Vbscript.RegExp')
>>>>oRegExp.global = .f.
>>>>oRegExp.Pattern = "[^:]//(\w+[\w-]*\w\.)*\w+"
>>>>lcRandomPlaceToStuffAString=oRegExp.Replace(this.Value,"WinNT://$1")
>>>
>>>ROFL! Yeah, I recognized that pattern immediately. It's the one where the programmer puts in lots of unintelligible lines of code that do nothing, but force the client to keep calling them back in -- since no one else can understand it. :-)
>>>
>>>So what does it really do? Maybe strip out excess "/"'s or something like that? Obviously in a real code audit, I'd have to run out and study regular expressions.
>>
>>Finds the substring that starts with // not prefixed immediately by :, up to the first terminating '.' and substitutes WinNT://
first matching string. Using it to start building an ADSI call...
>
>PS - in the real block of code, there's three lines of comments regarding the regular expression and some shortcomings in assumptions I made in building it that I haven't coded around yet.
Don't keep us in suspense, lets see the three lines of comment & see if it's any more understandable (especially to someone with only a small amount of knowledge about regular expressions).
Paul