Added regex validation and help for issue #98

This commit is contained in:
MikeMaximus
2018-02-06 09:40:57 -06:00
parent 66d280df49
commit e7b3f809f1
6 changed files with 46 additions and 6 deletions
+10
View File
@@ -274,6 +274,16 @@ Public Class mgrCommon
Return False
End Function
Public Shared Function IsRegExValid(ByVal sPattern As String) As Boolean
Dim oRegEx As Regex
Try
oRegEx = New Regex(sPattern)
Return True
Catch ex As Exception
Return False
End Try
End Function
'Calculate the current size of a folder
Public Shared Function GetFolderSize(ByVal sPath As String, ByVal sInclude As String(), ByVal sExclude As String()) As Long
Dim oFolder As DirectoryInfo