I am trying to validate email both on the client-side and on the server-side. The client-side is JavaScript(web front-end). The server-side is written in C++11.
The regex you are running is expecting a / before the start (^) and after the end ($) of the string. You need to remove the /^ and $/ at the beginning and end: