Search notes:

Oracle SQL function: REGEXP_LIKE

regexp_like( text , pattern [, match_param ] )
declare

   procedure test_17nn(p_text in varchar2) is
   --
   -- Tests if p_text is 17 followed by 2 digits.
   --

   begin

       if regexp_like(p_text, '^17\d\d$') then
          dbms_output.put_line(p_text || ' is ok');
       else
          dbms_output.put_line(p_text || ' is not ok');
       end if;

   end test_17nn;

begin


  test_17nn('1764');
  test_17nn('x1764');
  test_17nn('1764x');
  test_17nn('17a5');


end;
/
Github repository Oracle-Patterns, path: /SQL/functions/regular_expressions/regexp_like.plsql

See also

Oracle functions for regular expressions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1740443082, '18.225.117.244', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL/functions/regular_expressions/regexp_like/index(67): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78