I am trying to use this regexp statement:
select 1 from dual where regexp_like(\'040\', \'^[\\d\\*]{3}$\');
No output is returned but interest
This is because Oracle only supports the POSIX regular expressions standard, rather than the Perl syntax that you use in your first example.
Oracle Docs: http://docs.oracle.com/cd/B19306_01/appdev.102/b14251/adfns_regexp.htm#CHDJGBGG POSIX Regex Standard: http://pubs.opengroup.org/onlinepubs/007908799/xbd/re.html
Edit: As Alex Poole points out Oracle does actually support Perl regex syntax since Oracle 10gR2. Trying your example on my local 11gR2 install suggests that your syntax is wrong, the following works fine:
SELECT 1 FROM dual WHERE regexp_like('040', '^\d{3}$');