Tjena. Jag använder mig av ett script jag hittat här på webforum:
[red][b][blue]Set objRegExp = New RegExp[/blue][/b]
objRegExp.Global = true
objRegExp.IgnoreCase = true
objRegExp.Pattern = "^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
Set myMatches = objRegExp.Execute(strIn)[/red]
Men jag får felmeddelandet:
[red]
Microsoft VBScript runtime ( 0x800A01B0 )
File name or class name not found during Automation operation: 'RegExp'
file: /foot.asp
[b][blue]line: « 230 »[/blue][/b][/red]
<%
s = ScriptEngine & " version "
s = s & ScriptEngineMajorVersion & "."
s = s & ScriptEngineMinorVersion & "."
s = s & ScriptEngineBuildVersion
Response.write s
%>
Business Desk: "Library not registered" or other problems with regexp
When using Commerce Server Business Desk, if you receive the message "Library not registered" or another message stating that you have a problem with the regexp (Regular Expression) COM object, you may need to unregister and then re-register the Vbscript.dll file, which is located in the Windows System32 folder of the server.
This error message can appear on any page that has text edit controls (EditField) on it.
Solution
Unregister and re-register the file VBScript.dll. The following procedure assumes that Windows is installed at C:\winnt.
To unregister the file VBScript.dllAt the command prompt, type:
regsvr32.exe c:/winnt/system32/VBScript.dll /u
To reregister the file VBScript.dllAt the command prompt, type:
regsvr32.exe c:/winnt/system32/VBScript.dll