Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Continued comments ...
Message
From
22/03/2000 09:41:44
 
 
To
22/03/2000 08:52:18
Paul Frost
Instem Computer Systems Ltd
Stone, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00348010
Message ID:
00348851
Views:
31
>>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).
oRegExp = CREATEOBJ('Vbscript.RegExp')
oRegExp.global = .f.
oRegExp.Pattern = "[^:]//(\w+[\w-]*\w\.)*\w+"
*
* Expression - find first occurance of // not preceded by :, trailed by at least one non-immediate . followed by a wordvalue sequence
* allow any valid file constructor character set for a machine name;  no whitespace
* limits - lead character can't be -;  in theory, whitespace is permitted in a machine name
*
lcRandomPlaceToStuffAString=oRegExp.Replace(this.Value,"WinNT://$1") && form ADSI prefix
>Paul
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform