Skip to content

Instantly share code, notes, and snippets.

@zkarpinski
Created June 22, 2014 06:35
Show Gist options
  • Save zkarpinski/e7a57340f96763411145 to your computer and use it in GitHub Desktop.
Save zkarpinski/e7a57340f96763411145 to your computer and use it in GitHub Desktop.
How can I clean this up?
Public Sub Regex()
Dim strRegex As String
strRegex = GlobalModule.RegexAccount(mSubject)
If strRegex = "ACC# NOT FOUND" Then
strRegex = GlobalModule.RegexCustomer(mSubject)
If strRegex = "CUST# NOT FOUND" Then
strRegex = GlobalModule.RegexAccount(mBody)
If strRegex = "ACC# NOT FOUND" Then
strRegex = GlobalModule.RegexCustomer(mSubject)
If strRegex = "CUST# NOT FOUND" Then
strRegex = "UNKNOWN"
_IsValid = False
End If
End If
End If
End If
mCustAcc = strRegex
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment