From 663578140e894a64579813b07b50c3cfc600d641 Mon Sep 17 00:00:00 2001 From: reddyashish <43763136+reddyashish@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:59:08 -0700 Subject: [PATCH] Update PIIDetector.cs --- src/DynamoUtilities/PIIDetector.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/DynamoUtilities/PIIDetector.cs b/src/DynamoUtilities/PIIDetector.cs index 43ef96c0398..2ec7036acd3 100644 --- a/src/DynamoUtilities/PIIDetector.cs +++ b/src/DynamoUtilities/PIIDetector.cs @@ -1,9 +1,8 @@ -using Newtonsoft.Json.Linq; using System; -using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; +using Newtonsoft.Json.Linq; namespace Dynamo.Utilities { @@ -119,13 +118,16 @@ public static JToken GetNoteValue(JObject jsonWorkspace, string nodeId) internal static string RemovePIIData(string data) { string result; + + // ToDo: some of the regex patterns are interfering with other data in the json, + // so commenting them for now and will address those patterns later. result = Regex.Replace(data, emailPattern, ""); - result = Regex.Replace(result, websitePattern, ""); result = Regex.Replace(result, directoryPattern, ""); - result = Regex.Replace(result, creditCardPattern, ""); result = Regex.Replace(result, ssnPattern, ""); - result = Regex.Replace(result, ipPattern, ""); result = Regex.Replace(result, datePattern, ""); + //result = Regex.Replace(result, websitePattern, ""); + //result = Regex.Replace(result, creditCardPattern, ""); + //result = Regex.Replace(result, ipPattern, ""); return result; }