Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Regular Expression validation

Eslam_ElbyalyOct 19 2021

Hi, I am using Oracle APEX 21.1 and Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production.
APEX enables developers to validate a page item for a specific regular expression. I am using the following pattern....
/^(?=.*?[A-Z])(?=(.*[a-z]){1,})(?=(.*[\d]){1,})(?=(.*[\W]){1,})(?!.*\s).{8,}$/g
I am using that pattern to ensure that users must enter at least 8 characters that comprises of at least one capital character, one number and one special character. For example, "P@ssw0rd" should pass. The problem that it always return false. "12345678" and "P@ssw0rd" and any other combination do not pass. Is there something wrong with the regular expression. As far as I am aware, it's a POSIX standard. And I tested it on https://regexr.com/ and it finds a match when writing " P@ssw0rd".

Comments
Post Details
Added on Oct 19 2021
7 comments
1,990 views