Regular Expressions 101

Save & Share

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8
  • .NET 7.0 (C#)
  • Rust
  • Regex Flavor Guide

Function

  • Match
  • Substitution
  • List
  • Unit Tests

Tools

Sponsors
There are currently no sponsors. Become a sponsor today!
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.
  • All Tokens
  • Common Tokens
  • General Tokens
  • Anchors
  • Meta Sequences
  • Quantifiers
  • Group Constructs
  • Character Classes
  • Flags/Modifiers
  • Substitution
  • A single character of: a, b or c
    [abc]
  • A character except: a, b or c
    [^abc]
  • A character in the range: a-z
    [a-z]
  • A character not in the range: a-z
    [^a-z]
  • A character in the range: a-z or A-Z
    [a-zA-Z]
  • Any single character
    .
  • Alternate - match either a or b
    a|b
  • Any whitespace character
    \s
  • Any non-whitespace character
    \S
  • Any digit
    \d
  • Any non-digit
    \D
  • Any word character
    \w
  • Any non-word character
    \W
  • Non-capturing group
    (?:...)
  • Capturing group
    (...)
  • Zero or one of a
    a?
  • Zero or more of a
    a*
  • One or more of a
    a+
  • Exactly 3 of a
    a{3}
  • 3 or more of a
    a{3,}
  • Between 3 and 6 of a
    a{3,6}
  • Start of string
    ^
  • End of string
    $
  • A word boundary
    \b
  • Non-word boundary
    \B

Regular Expression
No Match

r"
"
img

Test String

Code Generator

Generated Code

#include <StringConstants.au3> ; to declare the Constants of StringRegExp #include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate Local $sRegex = "(?im)(\[\w+])(?:\.\([\w+])*" Local $sString = "The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of" & @CRLF & _ "evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy My brothers. And you wil[Table].[FieldName] Table.Field[d, d] l know My name is the Lord when I lay My vengeance upon thee." & @CRLF & _ "" & @CRLF & _ "-- Obligor Current Principal Payment Adjustment " & @CRLF & _ "--=============================== " & @CRLF & _ "--This the part of the document that describe the Obligor Current Principal Payment Adjustment " & @CRLF & _ "--===============================" & @CRLF & _ "" & @CRLF & _ "[HELOC_CS_Master].[O_CurrPrinPmtAdj] = CASE WHEN ([CSMonthlySourceView].[O_CURRPRINPMTADJ]) is not null" & @CRLF & _ "THEN [CSMonthlySourceView].[O_CURRPRINPMTADJ]" & @CRLF & _ "ELSE 0" & @CRLF & _ "END," & @CRLF & _ "-- Obligor Current Interest Payment Adjustment " & @CRLF & _ "[HELOC_CS_Master].[O_CurrIntPmtAdj] = CASE WHEN ([CSMonthlySourceView].[O_CURRINTPMTADJ]) is not null" & @CRLF & _ "THEN [CSMonthlySourceView].[O_CURRINTPMTADJ]" & @CRLF & _ "ELSE 0" & @CRLF & _ "END," & @CRLF & _ "-- Obligor Current Fee Payment Adjustment " & @CRLF & _ "[HELOC_CS_Master].[O_CurrFeesPmtAdj] = CASE WHEN ([CSMonthlySourceView].[O_CURRFeesPMTADJ]) is not null" & @CRLF & _ "THEN [CSMonthlySourceView].[O_CURRFeesPMTADJ]" & @CRLF & _ "ELSE 0" & @CRLF & _ "END," & @CRLF & _ "-- Obligor Current Recovery Payment Adjustment " & @CRLF & _ "[HELOC_CS_Master].[O_CurrRecovPmtAdj] = CASE WHEN ([CSMonthlySourceView].[O_CURRRecovPMTADJ])is not null" & @CRLF & _ "THEN [CSMonthlySourceView].[O_CURRRecovPMTADJ]" & @CRLF & _ "ELSE 0" & @CRLF & _ "END," & @CRLF & _ "-- Obligor Add Finance Charge Bal" & @CRLF & _ "[HELOC_CS_Master].[O_FCBalAdd] = [CSMonthlySourceView].[CASHINTERESTBILLEDTHISCYCLE]+[CSMonthlySourceView].[RETAILINTERESTBILLEDTHISCYCLE]" & @CRLF & _ "," & @CRLF & _ "-- Obligor Current Additional Principal Balance " & @CRLF & _ "[HELOC_CS_Master].[O_PrinBalAdd] = [CSMonthlySourceView].[MONTHLYRETAILAMOUNT]" & @CRLF & _ "+[CSMonthlySourceView].[MONTHLYCASHAMOUNT]" & @CRLF & _ "+[CSMonthlySourceView].[MONTHLYCHEQUEAMOUNT]," & @CRLF & _ "-- O_CurrBalEnd" & @CRLF & _ "[HELOC_CS_Master].[O_CurrBalEnd] = [CSMonthlySourceView].[PRINBALEND_CALC]+" & @CRLF & _ "[CSMonthlySourceView].[FCBALEND_CALC]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- O_FCBalEnd" & @CRLF & _ "[HELOC_CS_Master].[O_FCBalEnd] = [CSMonthlySourceView].[FCBALEND_CALC]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Obligor Current Installment Interest Payment " & @CRLF & _ "[HELOC_CS_Master].[O_CurrIntPmt] = isnull([CSMonthlySourceView].[FCBALEND_CALC],0)" & @CRLF & _ "+[HELOC_CS_Master].[O_FCBalAdd]" & @CRLF & _ "+isnull([HELOC_CS_Master].[O_CurrIntPmtAdj],0)" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Obligor Current Installment Principal Payment " & @CRLF & _ "[HELOC_CS_Master].[O_CurrPrinPmt] = " & @CRLF & _ "[CSMonthlySourceView].[O_PRINBALEND_PR]" & @CRLF & _ "-[HELOC_CS_Master].[O_PrinBalEnd]" & @CRLF & _ "+[HELOC_CS_Master].[O_PrinBalAdd]" & @CRLF & _ "+[HELOC_CS_Master].[O_CurrPrinPmtAdj]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Obligor Current Total Principal Payment " & @CRLF & _ "[HELOC_CS_Master].[O_CurrTotPrinPmt] = [HELOC_CS_Master].[O_CurrPrinPmt]," & @CRLF & _ "-- Obligor Current Fee Payment " & @CRLF & _ "[HELOC_CS_Master].[O_CurrFeesPmt] = [HELOC_CS_Master].[O_CurrFeesPmt]" & @CRLF & _ "+[HELOC_CS_Master].[O_CurrFeesPmtAdj]," & @CRLF & _ "-- Obligor Current Recovery Payment " & @CRLF & _ "[HELOC_CS_Master].[O_CurrRecovPmt] = [HELOC_CS_Master].[O_RecovPrin]" & @CRLF & _ "+[HELOC_CS_Master].[O_RecovInt]" & @CRLF & _ "+[HELOC_CS_Master].[O_CurrRecovPmtAdj]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Obligor Current Total Payment " & @CRLF & _ "[HELOC_CS_Master].[O_CurrTotPmt] = [HELOC_CS_Master].[O_CurrTotPrinPmt]" & @CRLF & _ "+[HELOC_CS_Master].[O_CurrIntPmt]," & @CRLF & _ "-- Investor Account Status " & @CRLF & _ "[HELOC_CS_Master].[S_AcctStatus] = [HELOC_CS_Master].[S_AcctStatusBeg]," & @CRLF & _ "-- Investor Current Balance (Beginning)" & @CRLF & _ "[HELOC_CS_Master].[S_InvCurrBal] = [HELOC_CS_Master].[S_CurrBalBeg]," & @CRLF & _ "-- Charge off Reason" & @CRLF & _ "[HELOC_CS_Master].[S_ChargeOffReason] = cASE WHEN [CSMonthlySourceView].[O_DONOTCHARGEOFFFLAG]='Y' THEN NULL" & @CRLF & _ "ELSE " & @CRLF & _ " CASE WHEN [HELOC_CS_Master].[S_AcctStatus]='Active' AND [HELOC_CS_Master].[S_InvCurrBal]>0" & @CRLF & _ " THEN " & @CRLF & _ " CASE WHEN [CSMonthlySourceView].[O_MANUALCHARGEOFFENDBALFLAG]='Y'" & @CRLF & _ " THEN 'ManualChargeOffBeg'" & @CRLF & _ " ELSE " & @CRLF & _ " CASE WHEN Rtrim([CSMonthlySourceView].[O_NewOrPrevChargeOff])='New'" & @CRLF & _ " THEN [CSMonthlySourceView].[O_CHARGEOFFREASONCODE] END" & @CRLF & _ " END" & @CRLF & _ " ELSE 'PRIOR' END" & @CRLF & _ "END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Charge-off Date " & @CRLF & _ "[HELOC_CS_Master].[S_ChargeOffDate] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus]='Active' AND" & @CRLF & _ "( [CSMonthlySourceView].[S_CHARGEOFFDATE_PR]) is null AND " & @CRLF & _ "([HELOC_CS_Master].[S_ChargeOffReason] ) is not null" & @CRLF & _ "THEN " & @CRLF & _ "CASE WHEN [HELOC_CS_Master].[PCD_SALE_DATE] > [CSMonthlySourceView].[PRIOR_DATE] +1 THEN " & @CRLF & _ "[HELOC_CS_Master].[PCD_SALE_DATE] ELSE [CSMonthlySourceView].[PRIOR_DATE] +1 END" & @CRLF & _ "ELSE [CSMonthlySourceView].[S_CHARGEOFFDATE_PR]" & @CRLF & _ "END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Charged-off Beginning Principal Balance " & @CRLF & _ "[HELOC_CS_Master].[S_ChargeOffBegPrinBal] = CASE WHEN" & @CRLF & _ "[HELOC_CS_Master].[S_ChargeOffDate] >[CSMonthlySourceView].[PRIOR_DATE] AND" & @CRLF & _ "[HELOC_CS_Master].[S_ChargeOffDate] > [HELOC_CS_Master].[PCD_ACT_D]" & @CRLF & _ "THEN [HELOC_CS_Master].[S_InvPrinBal] " & @CRLF & _ "ELSE 0" & @CRLF & _ "END," & @CRLF & _ "-- Investor Charged-off Beginning FC Balance " & @CRLF & _ "[HELOC_CS_Master].[S_ChargeOffBegFCBal] = CASE WHEN" & @CRLF & _ "[HELOC_CS_Master].[S_ChargeOffDate] > [CSMonthlySourceView].[PRIOR_DATE] AND" & @CRLF & _ "[HELOC_CS_Master].[S_ChargeOffDate] < [HELOC_CS_Master].[PCD_ACT_D]" & @CRLF & _ "THEN [HELOC_CS_Master].[S_InvFCBal] " & @CRLF & _ "ELSE 0" & @CRLF & _ "END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Charged-off Beginning Current Balance " & @CRLF & _ "[HELOC_CS_Master].[S_ChargeOffBegCurrBal] = [HELOC_CS_Master].[S_ChargeOffBegPrinBal] + [HELOC_CS_Master].[S_ChargeOffBegFCBal]" & @CRLF & _ "," & @CRLF & _ "-- Investor Repurchase Reason " & @CRLF & _ "[HELOC_CS_Master].[S_RepurchReason] = '1-test'" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Repurchase Reason Family" & @CRLF & _ "[HELOC_CS_Master].[S_RepurchReasonFamily] = " & @CRLF & _ "'Family Eligible'" & @CRLF & _ "" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Repurchase Date" & @CRLF & _ "[HELOC_CS_Master].[S_RepurchDate] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus]='Active' AND [CSMonthlySourceView].[S_REPURCHDATE_PR] is null AND [HELOC_CS_Master].[S_REPURCHREASONFAMILY] is not null" & @CRLF & _ "THEN CASE WHEN [CSMonthlySourceView].[PCD_SALE_DATE]>[CSMonthlySourceView].[PRIOR_DATE]+1 THEN " & @CRLF & _ "[CSMonthlySourceView].[PCD_SALE_DATE] ELSE [CSMonthlySourceView].[PRIOR_DATE]+1 END" & @CRLF & _ "ELSE [CSMonthlySourceView].[S_REPURCHDATE_PR] END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Repurchased Beginning Principal Balance" & @CRLF & _ "[HELOC_CS_Master].[S_RepurchBegPrinBal] = CASE WHEN [HELOC_CS_Master].[S_RepurchDate]>[CSMonthlySourceView].[PRIOR_DATE]" & @CRLF & _ "AND [HELOC_CS_Master].[S_RepurchDate] <[CSMonthlySourceView].[PCD_ACT_D]" & @CRLF & _ "AND [HELOC_CS_Master].[S_RepurchReason]<> '1 – Manual Repurchase For CleanUp Purchase Option'" & @CRLF & _ "THEN [HELOC_CS_Master].[S_InvPrinBal]" & @CRLF & _ "ELSE 0 END," & @CRLF & _ "-- Investor Repurchased Clean Up Beginning Principal Balance" & @CRLF & _ "[HELOC_CS_Master].[S_RepurchCleanUpBegPrinBal] = CASE WHEN [HELOC_CS_Master].[S_RepurchDate]>[CSMonthlySourceView].[PRIOR_DATE]" & @CRLF & _ "AND [HELOC_CS_Master].[S_RepurchDate] <[CSMonthlySourceView].[PCD_ACT_D]" & @CRLF & _ "AND [HELOC_CS_Master].[S_RepurchReason]= '1 – Manual Repurchase For CleanUp Purchase Option'" & @CRLF & _ "THEN [HELOC_CS_Master].[S_InvPrinBal]" & @CRLF & _ "ELSE 0 END," & @CRLF & _ "-- Investor Account Status (Post Beginning Charge-offs & Repurchases) " & @CRLF & _ "[HELOC_CS_Master].[S_AcctStatusPBCR] = CASE WHEN [HELOC_CS_Master].[S_Acctstatus]='Active'" & @CRLF & _ "THEN " & @CRLF & _ " CASE WHEN [HELOC_CS_Master].[S_ChargeoffDate]>[CSMonthlySourceView].[PRIOR_DATE]" & @CRLF & _ " AND [HELOC_CS_Master].[S_ChargeoffDate] <[CSMonthlySourceView].[PCD_ACT_D]" & @CRLF & _ " THEN 'Charge-off'" & @CRLF & _ " ELSE " & @CRLF & _ " CASE WHEN [HELOC_CS_Master].[S_RepurchDate]>[CSMonthlySourceView].[PRIOR_DATE]" & @CRLF & _ " AND [HELOC_CS_Master].[S_RepurchDate] <[CSMonthlySourceView].[PCD_ACT_D]" & @CRLF & _ " THEN" & @CRLF & _ " 'Repurchased' END" & @CRLF & _ " END" & @CRLF & _ "ELSE [HELOC_CS_Master].[S_Acctstatus]" & @CRLF & _ "END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Account Status" & @CRLF & _ "[HELOC_CS_Master].[S_AcctStatus] = [HELOC_CS_Master].[S_AcctStatusPBCR]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Principal Balance (Post Beginning Charge-offs & Repurchases) " & @CRLF & _ "[HELOC_CS_Master].[S_PrinBalPBCR] = [HELOC_CS_Master].[S_InvPrinBal]" & @CRLF & _ "-[HELOC_CS_Master].[S_RepurchBegPrinBal]" & @CRLF & _ "-[HELOC_CS_Master].[S_ChargeOffBegPrinBal]" & @CRLF & _ "-[HELOC_CS_Master].[S_RepurchCleanUpBegPrinBal]," & @CRLF & _ "-- Investor Principal Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvPrinBal] = [HELOC_CS_Master].[S_PrinBalPBCR]," & @CRLF & _ "-- Investor Finance Charge Balance (Post Beginning Charge-offs & Repurchases) " & @CRLF & _ "[HELOC_CS_Master].[S_FCBalPBCR] = [HELOC_CS_Master].[S_InvFCBal]" & @CRLF & _ "-[HELOC_CS_Master].[S_ChargeoffBegFCBal]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Finance Charge Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvFCBal] = [HELOC_CS_Master].[S_FCBalPBCR]," & @CRLF & _ "-- Investor Current Balance (Post Beg Charge Offs & Repurchases) " & @CRLF & _ "[HELOC_CS_Master].[S_CurrBalPBCR] = [HELOC_CS_Master].[S_PrinBalPBCR]+[HELOC_CS_Master].[S_FCBalPBCR]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvCurrBal] = [HELOC_CS_Master].[S_CurrBalPBCR]," & @CRLF & _ "-- Investor Additional Finance Charge Balance " & @CRLF & _ "[HELOC_CS_Master].[S_FCBalAdd] = [HELOC_CS_Master].[O_FCBalAdd]," & @CRLF & _ "-- Investor Additional Principal Balance " & @CRLF & _ "[HELOC_CS_Master].[S_PrinBalAdd] = [HELOC_CS_Master].[O_PrinBalAdd]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Principal Balance (Post Additional Receivables)" & @CRLF & _ "[HELOC_CS_Master].[S_PrinBalPAR] = [HELOC_CS_Master].[S_InvPrinBal]" & @CRLF & _ "+[HELOC_CS_Master].[S_PrinBalAdd]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Principal Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvPrinBal] = [HELOC_CS_Master].[S_PrinBalPAR]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Finance Charge Balance (Post Additional Receivables)" & @CRLF & _ "[HELOC_CS_Master].[S_FCBalPAR] = [HELOC_CS_Master].[S_InvFCBal]" & @CRLF & _ "+[HELOC_CS_Master].[S_FCBalAdd]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Finance Charge Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvFCBal] = [HELOC_CS_Master].[S_FCBalPAR]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "[HELOC_CS_Master].[S_CurrBalPAR] = [HELOC_CS_Master].[S_PrinBalPAR]+" & @CRLF & _ "[HELOC_CS_Master].[S_FCBalPAR]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvCurrBal] = [HELOC_CS_Master].[S_CurrBalPAR]," & @CRLF & _ "-- Investor Current Principal Payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrPrinPmt] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] in ('Active','Closed')" & @CRLF & _ "THEN [HELOC_CS_Master].[O_CurrPrinPmt]" & @CRLF & _ "ELSE 0 END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Principal Payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrTotPrinPmt] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] in ('Active','Closed')" & @CRLF & _ "THEN [HELOC_CS_Master].[S_CurrPrinPmt]" & @CRLF & _ "ELSE 0 END," & @CRLF & _ "-- Investor Current Excess Principal Payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrExcessPrinPmt] = CASE WHEN [HELOC_CS_Master].[S_CurrTotPrinPmt]-[HELOC_CS_Master].[S_InvPrinBal]<0 THEN 0 ELSE " & @CRLF & _ "[HELOC_CS_Master].[S_CurrTotPrinPmt]-[HELOC_CS_Master].[S_InvPrinBal] END," & @CRLF & _ "-- Investor Current Excess Principal Payment Used" & @CRLF & _ "[HELOC_CS_Master].[S_CurrExcessPrinPmtUsed] = CASE WHEN -1*(CASE WHEN [HELOC_CS_Master].[S_CurrTotPrinPmt]>0 THEN 0 ELSE [HELOC_CS_Master].[S_CurrTotPrinPmt] END)<[HELOC_CS_Master].[S_BegExcessPrinBal] THEN -1*(CASE WHEN [HELOC_CS_Master].[S_CurrTotPrinPmt]>0 THEN 0 ELSE [HELOC_CS_Master].[S_CurrTotPrinPmt] END) ELSE [HELOC_CS_Master].[S_BegExcessPrinBal] END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Principal Payment Post Excess" & @CRLF & _ "[HELOC_CS_Master].[S_CurrPrinPmtPostExcess] = CASE WHEN 1=1 THEN [HELOC_CS_Master].[S_CurrPrinPmt]" & @CRLF & _ "ELSE " & @CRLF & _ "[HELOC_CS_Master].[S_CurrPrinPmt]" & @CRLF & _ "-[HELOC_CS_Master].[S_CurrExcessPrinPmt]" & @CRLF & _ "+[HELOC_CS_Master].[S_CurrExcessPrinPmtUsed] END," & @CRLF & _ "-- Investor Current Fee Payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrFeePmt] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] in ('Active','Closed','Charged-off')" & @CRLF & _ "THEN [HELOC_CS_Master].[O_CurrFeesPmt]" & @CRLF & _ "ELSE 0 END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- S_CurrTotPrinPmt" & @CRLF & _ "[HELOC_CS_Master].[S_CurrTotPrinPmt] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] in ('Active','Closed')" & @CRLF & _ "THEN [HELOC_CS_Master].[S_CurrPrinPmtPostExcess]" & @CRLF & _ "ELSE 0 END," & @CRLF & _ "-- Investor Current Total Fee Pmt" & @CRLF & _ "[HELOC_CS_Master].[S_CurrTotFeePmt] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] in ('Active','Closed')" & @CRLF & _ "THEN [HELOC_CS_Master].[S_CurrFeePmt]" & @CRLF & _ "ELSE 0 END," & @CRLF & _ "-- Investor Current Recovery Payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrRecovPmt] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] ='Charged-off'" & @CRLF & _ "THEN [HELOC_CS_Master].[O_CurrRecovPmt]" & @CRLF & _ "ELSE 0 END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Recovery Payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrTotRecovPmt] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] ='Charged-off'" & @CRLF & _ "THEN [HELOC_CS_Master].[S_CurrRecovPmt]" & @CRLF & _ "ELSE 0 END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Excess Recovery payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrExcessRecovPmt] = CASE WHEN [HELOC_CS_Master].[S_CurrTotRecovPmt]-[HELOC_CS_Master].[S_BegChargeOffBal]<0 THEN 0 ELSE" & @CRLF & _ " [HELOC_CS_Master].[S_CurrTotRecovPmt]-[HELOC_CS_Master].[S_BegChargeOffBal] END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Excess Recovery payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrExcessRecovPmtUsed] = CASE WHEN -1*(CASE WHEN [HELOC_CS_Master].[S_CurrTotRecovPmt]>0 THEN 0 ELSE [HELOC_CS_Master].[S_CurrTotRecovPmt] END)<[HELOC_CS_Master].[S_BegExcessRecovBal] THEN " & @CRLF & _ "-1*(CASE WHEN [HELOC_CS_Master].[S_CurrTotRecovPmt]>0 THEN 0 ELSE [HELOC_CS_Master].[S_CurrTotRecovPmt] END)" & @CRLF & _ "ELSE [HELOC_CS_Master].[S_BegExcessRecovBal] END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Total Recovery Payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrTotRecovPmt] = CASE WHEN 1=1 THEN [HELOC_CS_Master].[S_CurrTotRecovPmt]" & @CRLF & _ "ELSE " & @CRLF & _ "[HELOC_CS_Master].[S_CurrTotRecovPmt]" & @CRLF & _ "-[HELOC_CS_Master].[S_CurrExcessRecovPmt]" & @CRLF & _ "+[HELOC_CS_Master].[S_CurrExcessRecovPmtUsed] END," & @CRLF & _ "-- Investor Current Interest Payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrIntPmt] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] in ('Active','Closed','Repurchased')" & @CRLF & _ "THEN [HELOC_CS_Master].[O_CurrIntPmt]" & @CRLF & _ "ELSE 0 END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Excess Interest Payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrExcessIntPmt] = CASE WHEN [HELOC_CS_Master].[S_CurrIntPmt]-[HELOC_CS_Master].[S_InvFCBal]<0 THEN 0 ELSE " & @CRLF & _ "[HELOC_CS_Master].[S_CurrIntPmt]-[HELOC_CS_Master].[S_InvFCBal] END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Excess Interest Payment Used" & @CRLF & _ "[HELOC_CS_Master].[S_CurrExcessIntPmtUsed] = CASE WHEN -1*(CASE WHEN [HELOC_CS_Master].[S_CurrIntPmt]>0 THEN 0 ELSE [HELOC_CS_Master].[S_CurrIntPmt]END)<[HELOC_CS_Master].[S_BegExcessFCBal] THEN " & @CRLF & _ "-1*(CASE WHEN [HELOC_CS_Master].[S_CurrIntPmt]>0 THEN 0 ELSE [HELOC_CS_Master].[S_CurrIntPmt]END)" & @CRLF & _ "ELSE [HELOC_CS_Master].[S_BegExcessFCBal] END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Interest Payment Post Excess" & @CRLF & _ "[HELOC_CS_Master].[S_CurrIntPmtPostExcess] = CASE WHEN 1=1 THEN [HELOC_CS_Master].[S_CurrIntPmt]" & @CRLF & _ "ELSE " & @CRLF & _ "[HELOC_CS_Master].[S_CurrIntPmt]" & @CRLF & _ "-[HELOC_CS_Master].[S_CurrExcessIntPmt]" & @CRLF & _ "+[HELOC_CS_Master].[S_CurrExcessIntPmtUsed] END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Interest Payment Post Excess" & @CRLF & _ "[HELOC_CS_Master].[S_CurrTotIntPmt] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] in ('Active','Closed','Repurchased')" & @CRLF & _ "THEN [HELOC_CS_Master].[S_CurrIntPmt]" & @CRLF & _ "ELSE 0 END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Total Cash Payment" & @CRLF & _ "[HELOC_CS_Master].[S_CurrTotCashPmt] = [HELOC_CS_Master].[S_CurrTotPrinPmt]" & @CRLF & _ "+[HELOC_CS_Master].[S_CurrTotIntPmt]" & @CRLF & _ "+[HELOC_CS_Master].[S_CurrFeePmt]" & @CRLF & _ "+[HELOC_CS_Master].[S_CurrTotRecovPmt]," & @CRLF & _ "-- Account Status (Post Investor Payment)" & @CRLF & _ "[HELOC_CS_Master].[S_AcctStatusPIP] = [HELOC_CS_Master].[S_AcctStatus]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Account Status (Post Investor Payment)" & @CRLF & _ "[HELOC_CS_Master].[S_AcctStatus] = [HELOC_CS_Master].[S_AcctStatusPIP]," & @CRLF & _ "-- Investor Principal Balance (Post Investor Payment)" & @CRLF & _ "[HELOC_CS_Master].[S_PrinBalPIP] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] in ('Active','Closed')" & @CRLF & _ "THEN [HELOC_CS_Master].[S_InvPrinBal]-[HELOC_CS_Master].[S_CurrTotPrinPmt]" & @CRLF & _ "ELSE [HELOC_CS_Master].[S_InvPrinBal] END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Principal Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvPrinBal] = [HELOC_CS_Master].[S_PrinBalPIP]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Finance Charge Balance (Post Investor Payment)" & @CRLF & _ "[HELOC_CS_Master].[S_FCBalPIP] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] in ('Active','Closed','Repurchased')" & @CRLF & _ "THEN [HELOC_CS_Master].[S_InvFCBal]- [HELOC_CS_Master].[S_CurrTOtIntPmt]" & @CRLF & _ "ELSE [HELOC_CS_Master].[S_InvFCBal] END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Finance Charge Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvFCBal] = [HELOC_CS_Master].[S_FCBalPIP]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Balance (Post Investor Payment)" & @CRLF & _ "[HELOC_CS_Master].[S_CurrBalPIP] = [HELOC_CS_Master].[S_PrinBalPIP]+[HELOC_CS_Master].[S_FCBalPIP]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Current Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvCurrBal] = [HELOC_CS_Master].[S_CurrBalPIP]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Closed Date" & @CRLF & _ "[HELOC_CS_Master].[S_ClosedDate] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus] ='Active' AND [HELOC_CS_Master].[S_InvCurrBal]=0 AND [CSMonthlySourceView].[S_INVCURRBAL_PR]=0 AND" & @CRLF & _ "[HELOC_CS_Master].[O_CLFixed]=0 AND [CSMonthlySourceView].[O_CLFixed_PR]=0" & @CRLF & _ "OR ([HELOC_CS_Master].[O_OnRiskFileFlag] is null AND [HELOC_CS_Master].[O_CLFixed]>0)" & @CRLF & _ "THEN [CSMonthlySourceView].[PCD_ACT_D]" & @CRLF & _ "ELSE CASE WHEN [HELOC_CS_Master].[S_AcctStatus] ='Closed'AND " & @CRLF & _ "([HELOC_CS_Master].[S_InvCurrBal]>0 OR [HELOC_CS_Master].[S_CurrTotPrinPmt]>0 OR[HELOC_CS_Master].[S_CurrTotIntPmt]>0) THEN NULL" & @CRLF & _ "ELSE [CSMonthlySourceView].[S_CLOSEDDATE_PR]" & @CRLF & _ "END " & @CRLF & _ "END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- NBR of Conseq Months Account Closed" & @CRLF & _ "[HELOC_CS_Master].[S_ClosedDateMonths] = CASE WHEN [HELOC_CS_Master].[S_ClosedDate] is null THEN 0" & @CRLF & _ "ELSE [CSMonthlySourceView].[S_CLOSEDDATEMONTHS_PR]+1 END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Account Status (Ending)" & @CRLF & _ "[HELOC_CS_Master].[S_AcctStatusEnd] = CASE WHEN [HELOC_CS_Master].[S_ClosedDate] =[HELOC_CS_Master].[PCD_ACT_D]" & @CRLF & _ "THEN 'Closed'" & @CRLF & _ "ELSE CASE WHEN [HELOC_CS_Master].[S_AcctStatus]='Closed' and [HELOC_CS_Master].[S_INvPrinBal]>0" & @CRLF & _ "THEN'Active' ELSE [HELOC_CS_Master].[S_AcctStatus]" & @CRLF & _ "END END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Account Status" & @CRLF & _ "[HELOC_CS_Master].[S_AcctStatus] = [HELOC_CS_Master].[S_AcctStatusEnd]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Principal Balance (Ending)" & @CRLF & _ "[HELOC_CS_Master].[S_PrinBalEnd] = [HELOC_CS_Master].[S_InvPrinBal]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Principal Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvPrinBal] = [HELOC_CS_Master].[S_PrinbalEnd]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Finance Charge Balance (Ending)" & @CRLF & _ "[HELOC_CS_Master].[S_FCBalEnd] = [HELOC_CS_Master].[S_InvFCBal]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Finance Charge Balance" & @CRLF & _ "[HELOC_CS_Master].[S_InvFCBal] = [HELOC_CS_Master].[S_FCBalEnd]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Ending Charge-off Balance" & @CRLF & _ "[HELOC_CS_Master].[S_EndChargeOffBal] = [HELOC_CS_Master].[S_BegChargeOffBal]" & @CRLF & _ "+[HELOC_CS_Master].[S_CurrChargeOffPrinAmt]" & @CRLF & _ "-[HELOC_CS_Master].[S_CurrTotRecovPmt]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Ending Excess Principal Balance" & @CRLF & _ "[HELOC_CS_Master].[S_EndExcessPrinBal] = [HELOC_CS_Master].[S_BegExcessPrinBal]" & @CRLF & _ "+[HELOC_CS_Master].[S_CurrExcessPrinPmt]" & @CRLF & _ "-[HELOC_CS_Master].[S_CurrExcessPrinPmtUsed]," & @CRLF & _ "-- Investor Ending Excess Finance Charge Balance" & @CRLF & _ "[HELOC_CS_Master].[S_EndExcessFCBal] = [HELOC_CS_Master].[S_BegExcessFCBal]" & @CRLF & _ "+[HELOC_CS_Master].[S_CurrExcessIntPmt]" & @CRLF & _ "-[HELOC_CS_Master].[S_CurrExcessIntPmtUsed]," & @CRLF & _ "-- Investor Ending Excess Recovery Balance" & @CRLF & _ "[HELOC_CS_Master].[S_EndExcessRecovBal] = [HELOC_CS_Master].[S_BegExcessRecovBal]" & @CRLF & _ "+[HELOC_CS_Master].[S_CurrExcessRecovPmt]" & @CRLF & _ "-[HELOC_CS_Master].[S_CurrExcessRecovPmtUsed]," & @CRLF & _ "-- Investor Current Balance (Ending)" & @CRLF & _ "[HELOC_CS_Master].[S_CurrBalEnd] = [HELOC_CS_Master].[S_PrinBalEnd]" & @CRLF & _ "+[HELOC_CS_Master].[S_FCBalEnd]," & @CRLF & _ "[HELOC_CS_Master].[S_PrinBalEndVar] = [HELOC_CS_Master].[S_PrinBalEnd]" & @CRLF & _ "-[HELOC_CS_Master].[O_PrinBalEnd]," & @CRLF & _ "-- Investor Finance Charge Balance Variance (Ending)" & @CRLF & _ "[HELOC_CS_Master].[S_FCBalEndVar] = [HELOC_CS_Master].[S_FCBalEnd]" & @CRLF & _ "-[HELOC_CS_Master].[O_FCBalEnd]," & @CRLF & _ "-- Investor Current Balance Variance (Ending)" & @CRLF & _ "[HELOC_CS_Master].[S_CurrBalEndVar] = [HELOC_CS_Master].[S_CurrBalEnd]" & @CRLF & _ "-[HELOC_CS_Master].[O_CurrBalEnd]" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Investor Beg and End Acctstatus Change" & @CRLF & _ "[HELOC_CS_Master].[S_AcctStatusChanged] = CASE WHEN [HELOC_CS_Master].[S_AcctStatusBeg] <>[HELOC_CS_Master].[S_AcctStatusEnd] " & @CRLF & _ "THEN 'Y' ELSE 'N' END," & @CRLF & _ "-- Investor Out of Deal Date" & @CRLF & _ "[HELOC_CS_Master].[S_OutOfDealDate] = CASE WHEN [HELOC_CS_Master].[S_RepurchDate]>[CSMonthlySourceView].[PRIOR_DATE]" & @CRLF & _ "AND [HELOC_CS_Master].[S_RepurchDate]<=[CSMonthlySourceView].[PCD_ACT_D]" & @CRLF & _ "THEN [HELOC_CS_Master].[S_RepurchDate]" & @CRLF & _ "ELSE[CSMonthlySourceView].[S_OUTOFDEALDATE_PR] END," & @CRLF & _ "-- Delinquency Bucket" & @CRLF & _ "[HELOC_CS_Master].[O_DelinqBucket] = CASE WHEN [CSMonthlySourceView].[DAYSDELINQUENT]>=0 AND [CSMonthlySourceView].[DAYSDELINQUENT]<=29 THEN '0-29' " & @CRLF & _ " WHEN [CSMonthlySourceView].[DAYSDELINQUENT]>=30 AND [CSMonthlySourceView].[DAYSDELINQUENT]<=89 THEN '30-89' " & @CRLF & _ " WHEN [CSMonthlySourceView].[DAYSDELINQUENT]>=90 AND [CSMonthlySourceView].[DAYSDELINQUENT]<=209 THEN '90-209' " & @CRLF & _ " WHEN [CSMonthlySourceView].[DAYSDELINQUENT]>=210 THEN '>=210' " & @CRLF & _ " ELSE NULL END" & @CRLF & _ " " & @CRLF & _ "------------------------------------------------------------------------------------" & @CRLF & _ "-- Delinquency 0-29 Balance" & @CRLF & _ "[HELOC_CS_Master].[O_Delinq0to29Bal] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus]='Active' AND [HELOC_CS_Master].[O_DelinqBucket]='0-29'" & @CRLF & _ "THEN [HELOC_CS_Master].[S_InvPrinBal] ELSE 0 END," & @CRLF & _ "-- Delinquency 30-89 Balance" & @CRLF & _ "[HELOC_CS_Master].[O_Delinq30to89Bal] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus]='Active' AND [HELOC_CS_Master].[O_DelinqBucket]='30-89'" & @CRLF & _ "THEN [HELOC_CS_Master].[S_InvPrinBal] ELSE 0 END," & @CRLF & _ "-- Delinquency 90-209 Balance" & @CRLF & _ "[HELOC_CS_Master].[O_Delinq90to209Bal] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus]='Active' AND [HELOC_CS_Master].[O_DelinqBucket]='90-209'" & @CRLF & _ "THEN [HELOC_CS_Master].[S_InvPrinBal] ELSE 0 END," & @CRLF & _ "-- Delinquency GT 210 Balance" & @CRLF & _ "[HELOC_CS_Master].[O_DelinqGT210Bal] = CASE WHEN [HELOC_CS_Master].[S_AcctStatus]='Active' AND [HELOC_CS_Master].[O_DelinqBucket]='>=210'" & @CRLF & _ "THEN [HELOC_CS_Master].[S_InvPrinBal] ELSE 0 END," & @CRLF & _ "-- PCD_SALE_DATE" & @CRLF & _ "[HELOC_CS_Master].[PCD_SALE_DATE] = [CSMonthlySourceView].[PCD_SALE_DATE]," & @CRLF & _ "-- PCD_SALE_ID" & @CRLF & _ "[HELOC_CS_Master].[PCD_SALE_ID] = [CSMonthlySourceView].[PCD_SALE_ID]" & @CRLF & _ "" Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH) Local $aFullArray[0] For $i = 0 To UBound($aArray) -1 _ArrayConcatenate($aFullArray, $aArray[$i]) Next $aArray = $aFullArray ; Present the entire match result _ArrayDisplay($aArray, "Result")

Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm