Please help with this regular expresion

the task is to check if the input is valid and encrypt it to be valid the string should be
“$$$>312|dfe|KFE|@!#<$$$” this is the input

-it should start end and with group of 3 symbols
-there is a greeter sigh > after the first group and less than sign < before the last one

  • in between there are 4 groups separeted by |
    -the first group(numbers)
  • second(Lower case letters)
    -third(Upper case letters)
  • fourth(symbols except <)
    “$$$>312|dfe|KFE|@!#<$$$” this message is valid and output should be “Try another password!” if the regex is correct
    please help me
    thank you for your time

What do you have so far? Are there any particular parts of this assignment that you are stuck on?