Read the manual http://docs.oracle.com/cd/B12037_01/server.101/b10759/conditions018.htm ;)
select * from (
select '1000 - 2000 test' a from dual
union all select '1000 - 2123 TEST' a from dual
) where
REGEXP_LIKE(a, '^[0-9]{4} - [0-9]{4} test', 'c');
Returning
1000 - 2000 test
is case sensitive because of 'c'
, thus the above gives 1 row whereas below, using 'i'
case insensitive, gives 2:
select * from (
select '1000 - 2000 test' a from dual
union all select '1000 - 2123 TEST' a from dual
) where
REGEXP_LIKE(a, '^[0-9]{4} - [0-9]{4} test', 'i');
Returning
1000 - 2000 test
1000 - 2123 TEST