Steve VBScripting should be available on the machine if a standard install has been done. On lots of networked systems the scripting is disabled by network admins to lock down the system. It can usually be easily changed in the user profiles.
Normally if it has been disabled then the Network admin have a good grasp of the system and can simply enabled on a user by user basis. I very rarely see it disabled as there is so much software out there that depends on it but some admins are paranoid about being hit by the script kiddies Dave Crozier -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Ellenoff Sent: 09 May 2007 18:11 To: profox@leafe.com Subject: RE: Validating an email address? Thanks Dave!! This is great! Only question I have is, what are the requirements for having the VBScript.RegExp available on the client machine, ie, does it come preinstalled with XP (or some other software) or do I have to manually install on each client machine? At 12:41 PM 5/9/2007, you wrote: >Steve, >Also A VFP solution using VB Scripting solution as programmatic classes >below > >Dave Crozier > >*********** >* Classes to validate email addresses >Local oReg > >oReg_Email=CreateObject("clsEmailRegularExpression") >oReg_HTTP=CreateObject("clsHTTPRegularExpression") > >Clear > >? oReg_Email.Test("[EMAIL PROTECTED]") && OK >? oReg_Email.Test("[EMAIL PROTECTED] software.co.uk") && Invalid >* >? oReg_HTTP.Test("www.replacement-software.co.uk") && Invalid >? oReg_HTTP.Test("http://www.replacement-software.co.uk ") &&OK >* >Return > > >Define Class clsAbstractRegularExpression As Relation > sName = "clsAbstractRegularExpression" > sPattern = "" > > bIgnoreCase = .T. > bGlobal = .T. > sRegExpClass = "VBScript.RegExp" > oRegExp = Null > > Protected sName, sPattern, bIgnoreCase, bGlobal, ; > sRegExpClass, oRegExp > > > Protected Procedure Init() > LOCAL llRetVal > > llRetVal = DODEFAULT() > If llRetVal > This.oRegExp = CreateObject(This.sRegExpClass) > With This.oRegExp > .Pattern = This.sPattern > .IgnoreCase = This.bIgnoreCase > .Global = This.bGlobal > EndWith > EndIf > EndProc > > Protected Procedure GarbageCollect > This.bGarbageCollected = .T. > This.oRegExp = Null > * > EndProc > > Procedure Test(tsSearchString) > LOCAL lbRetVal > > lbRetVal = This.oRegExp.Test(tsSearchString) > Return lbRetVal > * > EndProc > > Procedure Replace(tsSearchString, tsReplaceString) > LOCAL lbRetVal > > lbRetVal = This.oRegExp.Replace(tsSearchString, tsReplaceString) > > Return lbRetVal > * > EndProc > > > Procedure Execute(tsSearchString) > LOCAL loMatches > > lomatches = This.oRegExp.Test(tsSearchString) > Return loMatches > EndProc > * >EndDefine > > >*-- Matches URLs in the form of http://URL or https://URL >Define Class clsHTTPRegularExpression As clsAbstractRegularExpression > sName= "clsHTTPRegularExpression" > sPattern= "((http(s?)\://){1}\S+)" > bIgnoreCase= .T. > bGlobal= .T. > > Protected sName, sPattern, bIgnoreCase, bGlobal, ; > sRegExpClass, oRegExp > * >EndDefine > >*-- Matches Emails the form of [EMAIL PROTECTED] >Define Class clsEmailRegularExpression As clsAbstractRegularExpression > sName="clsHTTPRegularExpression" > sPattern= "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]" ; > +"@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" > bIgnoreCase= .T. > bGlobal= .T. > > Protected sName, sPattern, bIgnoreCase, bGlobal, ; > sRegExpClass, oRegExp > * >EndDefine >* >* End of Coding > > >No virus found in this outgoing message. >Checked by AVG Free Edition. >Version: 7.5.467 / Virus Database: 269.6.6/794 - Release Date: 08/05/2007 >14:23 > > > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.