I'm trying to convert a C# REGEX into a Oracle PLSQL compatible REGEX. This REGEX was used to validate e-mail address format.
C# REGEX
[\w!#$%&’*+\-=?\^_`{|}~]+(\.[\w!#$%&’*+\-=?\^_`{|}~]+)*@((([\-\w]+\.)+[\w]{2,})|(([0-9]1,3}\.){3}[0-9]{1,3}))
Oracle 19c Version 19.20.0.0.0
I tried different stuff and came up with the below expression,
Oracle PLSQL REGEX
^[a-zA-Z0-9!#$%&'*+\-\/=?\^_`{|}~]+(\.[a-zA-Z0-9!#$%&'*+\-\/=?\^_`{|}~]+)*@((([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,})|(([0-9]{1,3}\.){3}[0-9]{1,3}))$
But the test results doesn't match the below test case,
- [email protected] - This is an invalid email address
Can someone please help me to convert the C# REGEX into a Oracle PLSQL compatible REGEX?
\wand other shorthand character classes inside bracket expressions.[\w!#$%&’*+\-=?\^_`{|}~]should be[a-zA-Z0-9!#$%&’*+=?^_`{|}~-](swap\wfora-zA-Z0-9_, remove the \ escape characters and move-to the end).example+"test"@gmail.comis a valid e-mail and your pattern will not match it.