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!

RegEx for 8 digits exactly

sql_coder6 days ago

Hello,

I am looking for regexp_like pattern to find exactly 8 digits in a string. Example cases:

  1. ‘12345678’ is true
  2. ‘12345678_END’ is true
  3. ‘START 12345678’ is true
  4. ‘123456789’ is false
  5. ‘Start 123456789 END’ is false
  6. ‘12345678 123456789’ is true
  7. ‘1234 5678’ is false

I need the exact 8 digits as one "word". Any suggestions for the pattern ?

sql_coder

This post has been answered by mathguy on Aug 3 2026
Jump to Answer
Comments
Post Details
Added 6 days ago
4 comments
84 views