You should code it yourself in PowerBuilder so you can easily update it. The rules are:
General layout:
local-part@domain
Local Part:
Can be up to 64 characters.
Allowed: letters, numbers, underscores, periods, and dashes.
First and last must be letter or number.
Some mail servers may allow other special characters.
Domain:
Can be up to 255 characters.
Allowed: letters, numbers, and dashes.
First and last must be letter or number.
There can only be one dot.
Part before the dot must be at least one character.
Part after the dot must be at least two characters.
There's a regex at https://emailregex.com/ that works for most addresses and it is very complicated.