What do the regexp_pattern and regexp_replace_string pa…

Examine the command below:
BEGIN DBMS_REDACT.ADD_POLICY(
object_schema => ‘mavis’,
object_name => ‘cust_info’,
column_name => ’emp_id’,
policy_name => ‘redact_cust_ids’,
function_type => DBMS_REDACT.REGEXP,
expression => ‘1=1’,
regexp_pattern => ‘(\\d\\d\\d)(\\d\\d)(\\d\\d\\d\\d)’,
regexp_replace_string => ‘XXXXX\\3’,
regexp_position => 1,
regexp_occurrence => 0,
regexp_match_parameter => ‘i’,
policy_description => ‘Redacts customer IDs’,
column_description => ’emp_id contains employee ID numbers’);
END;
/
What do the regexp_pattern and regexp_replace_string parameters accomplish?

Examine the command below:
BEGIN DBMS_REDACT.ADD_POLICY(
object_schema => ‘mavis’,
object_name => ‘cust_info’,
column_name => ’emp_id’,
policy_name => ‘redact_cust_ids’,
function_type => DBMS_REDACT.REGEXP,
expression => ‘1=1’,
regexp_pattern => ‘(\\d\\d\\d)(\\d\\d)(\\d\\d\\d\\d)’,
regexp_replace_string => ‘XXXXX\\3’,
regexp_position => 1,
regexp_occurrence => 0,
regexp_match_parameter => ‘i’,
policy_description => ‘Redacts customer IDs’,
column_description => ’emp_id contains employee ID numbers’);
END;
/
What do the regexp_pattern and regexp_replace_string parameters accomplish?

A.
They find a pattern of nine digits; break the digits into three groups that contain the first three, the next two
and then the last four digits; and replace all digits with XXXXX concatenated with the last four digits.

B.
They find a pattern of six digits; break the digits into two groups that contain the first five, and then the last
digit; and replace all digits with XXXXX concatenated with the last digit.

C.
They find a pattern of nine digits and display the digits as XXXXX XX XXXX.

D.
They find a pattern of nine digits and display the first five digits as XXXXX and the last four digits as 3333.

Explanation:
http://docs.oracle.com/database/121/ASOAG/redaction_features.htm#ASOAG925



Leave a Reply 0

Your email address will not be published. Required fields are marked *