I want to write regex for match strings- For example there are below two string for match regex-
05-Jul-2021 ***IDCW Transfer plan ( IDCW TransferRegistered)Corporate Bond Fund - DP Growth***
17-Sep-2021 ***IDCW TransferOut/IDCW paid & Transferred to other scheme @ Rs.0.70 per unit to Corporate Bond Fund - DP Growth***
If string have (IDCW or Dividend), (Payout|Paid|Pay Out|Transfer) then match else if string have (Registered or register) then not match
MY Regex: /\*{3}\s*([\w\W]*(Dividend|IDCW) (Payout|Paid|Pay Out|Transfer)[\w\W&?!Registered]*)\s*\*{3}$/i
Please suggest me the right regex.