File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,8 @@ def deidentify(file_name, project_id):
91
91
# are interpreted as phone numbers
92
92
93
93
regex = (r".([A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`"
94
- "{|}~-]+)*)(\sat\s+)((?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+"
95
- "[a-z0-9](?:[a-z0-9-]*[a-z0-9]))" )
94
+ "{|}~-]+)*)(\sat\s+)((?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+"
95
+ "[a-z0-9](?:[a-z0-9-]*[a-z0-9]))" )
96
96
97
97
updated_transcript = re .sub (regex , r" \1@\3" , transcript )
98
98
@@ -108,13 +108,11 @@ def deidentify(file_name, project_id):
108
108
109
109
# Print out the results.
110
110
print ('Final Result with sensitive content redacted: {}'
111
- .format (dlp_response .item .value ))
111
+ .format (dlp_response .item .value ))
112
112
# [END dlp_deidentify_masking]
113
113
114
114
115
115
if __name__ == '__main__' :
116
-
117
-
118
116
parser = argparse .ArgumentParser (
119
117
description = __doc__ ,
120
118
formatter_class = argparse .RawDescriptionHelpFormatter )
You can’t perform that action at this time.
0 commit comments