正则表达式

正则表达式_第1张图片

 

 当前测试了这些

--[ ]
elect 1 from dual where regexp_like('fsdf','[a-z]');
select 1 from dual where regexp_like('fsDdf','[A-Z]');
select 1 from dual where regexp_like('fsD7df','[0-9]');
select 1 from dual where regexp_like('fsD7df','[0-9a-aA-Z]');
--{ }
select 1 from dual where regexp_like('fsDa7adf','a{2}');--匹配是否有两个连续a
--^ $
select 1 from dual where regexp_like('fsD7aadf','^f');
select 1 from dual where regexp_like('fsD7aadf','f$');
--* + ?
select 1 from dual where regexp_like('fsD7aadf','fH*');
select 1 from dual where regexp_like('fsD7aadf','f+');
select 1 from dual where regexp_like('fsD7aaadf','(a)?');

 但是还有这个未搞懂

--\1   
select 1 from dual where regexp_like('fsD7aadf','([a])\1');
select 1 from dual where regexp_like('SaagAfd','(a)\1');
select 1 from dual where regexp_like('abQqqfdfdfddffqweyifasaf','([a-d])\1');
select * from dual where regexp_like('abQqqfdfdfdddffqweyifasaf','(.)\2');
select 1 from dual where regexp_like('abQqqfdfdfdddffqweyifasaf','(.)\1{2}')
select regexp_replace('09/29/2008', '^([0-9]{2})/([0-9]{2})/([0-9]{4})$', '\3-\1-\2')  replace 
from dual; 

  

 

 

你可能感兴趣的:(正则表达式)