This course you mean: https://gettingstarted.mendixcloud.com/link/module/95/lecture/766/8.3.1-Add-Regular-Expressions
The regex you are using is the General Email Regex (RFC 5322 Official Standard) taken from http://emailregex.com/.
Regular expressions are often quickly confusing. When working with any non-trivial regex, you best develop it using freeformatter.com. Once you are happy with the result, save it on your account on the same site for your own future reference. Also, add unit tests to it. You will very likely still get some unexpected results. Modify your regex to match every last possible value of your application’s use-cases.
Only then copy it to your Mendix app. Make sure you document it well and that you copy the unit tests to your app as well.
But getting back to your question: where do you go wrong? The regex in your forumpost is fine. So the question is, what have you not done according to the course?
I had the same issue. I edited the ‘MyFirstModule.Email’ regular expression and noticed there was an extra EOL (End of Line) character at the very end. I deleted that EOL character, clicked ‘OK’, and it worked for me!
On the way Become a Fast Developer, the same problem occurred to me. I was able to solve with the help of the friend who freeformatter.com and there I got the following expression that solved the problem:
^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$