Imports System.Text.RegularExpressions
Public Class Tester
Public Shared Sub Main
Dim numPattern As String = _
"[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?"
Dim wordPattern As String = "\w+"
Dim whichNamespace As String = "NumbersRegex"
Dim isPublic As Boolean = True
Dim compNumbers As New RegexCompilationInfo(numPattern, _
RegexOptions.Compiled, "RgxNumbers", _
whichNamespace, isPublic)
Dim compWords As New RegexCompilationInfo(wordPattern, _
RegexOptions.Compiled, "RgxWords", whichNamespace, _
isPublic)
Dim compAll() As RegexCompilationInfo = _
{compNumbers, compWords}
Dim whichAssembly As New _
System.Reflection.AssemblyName("RgxNumbersWords")
Regex.CompileToAssembly(compAll, whichAssembly)
End Sub
End Class