My Environment - BizTalk 2004, BizTalk 2004 HIPAA Accelerator 3.0
Hello,
I have a map that uses a script functoid (inline VB.NET) with a
regular expression. I have created the function in a separate VB .NET
project to ensure that it compiles (it does). However, when I add the
function to the scripting functoid and try to compile, I get the
following error:
Inline Script Error: Type 'System.Text.RegularExpresssions.Regex' is
not defined.
I have tried two versions of the function (both compile in my VB .NET
project), and both receive the same error in BizTalk on compile:
Version 1
---------------
Function fnSetSrvTypeCode(ByVal strServTypeCode As String)
Dim _Regex As Object
_Regex = new System.Text.RegularExpressions.Regex()
Dim pattern As String
Dim strInput As String
Dim strOutput As String
pattern = "1[^37]|2[^09]|3[^01]|4[^789]|5[46789]|6[^026]|
7[^389]|8[^67]|9[0125]|A[^0]|B[^JKLMNPQS]"
strInput = strServTypeCode
If _Regex.IsMatch(strInput, pattern) Then
strOutput = "L"
Else
strOutput = "S"
End If
End Function
Version 2
----------------
Function fnSetSrvTypeCode(ByVal strServTypeCode As String)
Dim pattern As String
Dim strInput As String
Dim strOutput As String
pattern = "1[^37]|2[^09]|3[^01]|4[^789]|5[46789]|6[^026]|
7[^389]|8[^67]|9[0125]|A[^0]|B[^JKLMNPQS]"
strInput = strServTypeCode
If System.Text.RegularExpressions.Regex.IsMatch(strInput,
pattern) Then
strOutput = "L"
Else
strOutput = "S"
End If
End Function
Has anyone else encountered this before? If so, what your resolution
or workaround?
Thanks for any help you can provide,
H


|