bin/datamasking/pii-patterns.json
[
{ "Name": "Bitcoin Address", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "(?<![a-km-zA-HJ-NP-Z0-9])[13][a-km-zA-HJ-NP-Z0-9]{26,33}(?![a-km-zA-HJ-NP-Z0-9])", "Description": "" }, { "Name": "Creditcard", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "(\\d{4}([\\D]?\\d{4}){3}([\\D]?\\d{3})?|\\d{4}[\\D]?\\d{6}[\\D]?\\d{5}([\\D]?\\d{4})?)[^A-Za-z0-9]", "Description": "" }, { "Name": "Creditcard AMEX", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "(3[47]\\d{13})|(3[47]\\d{2}[-| ]\\d{6}[-| ]\\d{5})", "Description": "" }, { "Name": "Creditcard Mastercard", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "(5[1-5]\\d{14})|(5[1-5]\\d{2}[-| ]\\d{4}[-| ]\\d{4}[-| ]\\d{4})", "Description": "" }, { "Name": "Creditcard Mastercard", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "^(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$", "Description": "MasterCard credit card with new range" }, { "Name": "Creditcard VISA", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "(4\\d{3}[-| ]\\d{4}[-| ]\\d{4}[-| ]\\d{4})|(4\\d{15})", "Description": "" }, { "Name": "Creditcard VISA", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "(4\\d{3}[-| ]\\d{4}[-| ]\\d{4}[-| ]\\d{7})|(4\\d{19})", "Description": "VISA credit card with 19 digits" }, { "Name": "Creditcard Diners Club", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "(3(?:0[0-5]|[68]\\d)\\d{11})|(3(?:0[0-5]|[68]\\d)\\d[-| ]\\d{6}[-| ]\\d{4})", "Description": "" }, { "Name": "Creditcard Discover", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "(6(?:011|5\\d{2})\\d{12})|(6(?:011|5\\d{2})[-| ]\\d{4}[-| ]\\d{4}[-| ]\\d{4})", "Description": "" }, { "Name": "Creditcard JCB", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "((?:2131|1800|35\\d{3})\\d{11})|((?:2131|1800|35\\d{2})[-| ]\\d{4}[-| ]\\d{4}[-| ]\\d{3}[\\d| ])", "Description": "" }, { "Name": "E-mail", "Category": "Communication", "Country": "All", "CountryCode": "All", "Pattern": "^[\\w\\.=-]+@[\\w\\.-]+\\.[\\w]{2,3}$", "Description": "" }, { "Name": "Phone Number (Mobile)", "Category": "Communication", "Country": "Netherlands", "CountryCode": "NL", "Pattern": "^0[6]{1}(\\-)?[^0\\D]{1}\\d{7}$", "Description": "" }, { "Name": "Phone Number", "Category": "Communication", "Country": "United Kingdom", "CountryCode": "UK", "Pattern": "^(((\\+44\\s?\\d{4}|\\(?0\\d{4}\\)?)\\s?\\d{3}\\s?\\d{3})|((\\+44\\s?\\d{3}|\\(?0\\d{3}\\)?)\\s?\\d{3}\\s?\\d{4})|((\\+44\\s?\\d{2}|\\(?0\\d{2}\\)?)\\s?\\d{4}\\s?\\d{4}))(\\s?\\#(\\d{4}|\\d{3}))?$", "Description": "" }, { "Name": "IBAN Number", "Category": "Financial", "Country": "All", "CountryCode": "All", "Pattern": "[A-Z]{2}?[ ]?[0-9]{2}[]?[0-9]{4}[ ]?[0-9]{4}[ ]?[0-9]{4}[ ]?[0-9]{4}[ ]?[0-9]{4}", "Description": "" }, { "Name": "IPv4 Address", "Category": "Internet", "Country": "All", "CountryCode": "All", "Pattern": "((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])", "Description": "" }, { "Name": "IPv6 Address", "Category": "Internet", "Country": "All", "CountryCode": "All", "Pattern": "(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))", "Description": "" }, { "Name": "Street Address", "Category": "Location", "Country": "United States of America", "CountryCode": "US", "Pattern": "\\d{1,4} [\\w\\s]{1,20}(?:street|st|avenue|ave|road|rd|highway|hwy|square|sq|trail|trl|drive|dr|court|ct|parkway|pkwy|circle|cir|boulevard|blvd)\\W?(?=\\s|$)", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Austria", "CountryCode": "AT", "Pattern": "[0-9]{12}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Austria", "CountryCode": "AT", "Pattern": "^[0-9]{10}$", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Belgium", "CountryCode": "BE", "Pattern": "[0-9]{2}\\.?(0[1-9]|1[0-2])\\.?(0[1-9]|1[0-9]|2[0-9]|3[0-1])-[0-9]{3}\\.?[0-9]{2}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Bulgaria", "CountryCode": "Bg", "Pattern": "[0-9]{2}\\.?[0-9]{2}\\.?[0-9]{2}-[0-9]{3}\\.?[0-9]{2}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Netherlands", "CountryCode": "NL", "Pattern": "^[0-9]{9}$", "Description": "Social Security Number (Burgerservicenummer) Netherlands" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "United States of America", "CountryCode": "US", "Pattern": "\\b(?!000|666|9\\d{2})([0-8]\\d{2}|7([0-6]\\d))([-]?|\\s{1})(?!00)\\d\\d\\2(?!0000)\\d{4}\b", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Slovakia", "CountryCode": "SK", "Pattern": "[0-9]{2}[0,1,5][0-9][0-9]{2}/?[0-9]{4}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Slovakia", "CountryCode": "SK", "Pattern": "[A-Z]{2}[0-9]{6}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Denmark", "CountryCode": "DK", "Pattern": "[0-9]{2}[0,1][0-9][0-9]{2}-[0-9]{4}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Estonia", "CountryCode": "EE", "Pattern": "[1-6][0-9]{2}[1,2][0-9][0-9]{2}[0-9]{4}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Finland", "CountryCode": "FI", "Pattern": "[0-9]{2}\\.?[0,1][0-9]\\.?[0-9]{2}[-+A][0-9]{3}[A-Z]", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "France", "CountryCode": "FR", "Pattern": "1,2][ ]?[0-9]{2}[]?[0,1,2,3,5][0-9][ ]?[0-9A-Z]{5}[ ]?[0-9]{3}[ ]?[0-9]{2}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Germany", "CountryCode": "DE", "Pattern": "[0-9]{2}[0,1][0-9][0-9]{2}-[A-Z]-[0-9]{5}", "Description": "Social security number (Personenkennziffer)" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Germany", "CountryCode": "DE", "Pattern": "[0-9]{3}/?[0-9]{4}/?[0-9]{4}", "Description": "Social Security Number (Steuer-Identifikationsnummer)" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Germany", "CountryCode": "DE", "Pattern": "[0-9]{2}[0-9]{2}[0,1][0-9][0-9]{2}[A-Z][0-9]{2}[0-9]", "Description": "Social Security Number (Versicherungsnummer,Rentenversicherungsnummer)" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Greece", "CountryCode": "GR", "Pattern": "[A-Z][ -]?[0-9]{6}", "Description": "Social Security Number (Tautotita)" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Hungary", "CountryCode": "HU", "Pattern": "[0-9]{3}[ ]?[0-9]{3}[ ][0-9]{3}", "Description": "" }, { "Name": "Personal identfication number", "Category": "Personal", "Country": "Hungary", "CountryCode": "HU", "Pattern": "[1-8][ ]?[0-9]{2}[0,1][0-9][0-9]{2}[ ]?[0-9]{4}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Ireland", "CountryCode": "IE", "Pattern": "[0-9]{7}[A-Z]W?", "Description": "Personal Public Service (PPS) Number" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Italy", "CountryCode": "IT", "Pattern": "[A-Z]{6}[0-9]{2}[A-E,H,L,M,P,R-T][0-9]{2}[A-Z0-9]{5}", "Description": "Social Security Number (NumberCodice fiscale)" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Latvia", "CountryCode": "LV", "Pattern": "[0-9]{2}[0,1][0-9][0-9]-[0-9]{5}", "Description": "Social Security (Personas kodas)" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Lithuania", "CountryCode": "LT", "Pattern": "[3-6][0-9]{2}[0,1][0-9][0-9]{2}[0-9]{4}", "Description": "Social Security Number (Asmens kodas)" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Norway", "CountryCode": "NO", "Pattern": "[0-9]{2}[0,1][0-9][0-9]{2}[ ]?[0-9]{5}", "Description": "Social Security Number (Fødselsnummer)" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Poland", "CountryCode": "PL", "Pattern": "[0-9]{4}[0-3]{1}[0-9}{1}[0-9]{5}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Romania", "CountryCode": "RO", "Pattern": "[1-8][0-9]{2}[0,1][0-9][0-9]{2}[0-9]{6}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Spain", "CountryCode": "ES", "Pattern": "[0-9,X,M,L,K,Y][0-9]{7}[A-Z]", "Description": "Social Security Number (Documento Nacional de Identidad)" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Sweden", "CountryCode": "SE", "Pattern": "[0-9]{2}[0-1][0-9][0-9]{2}[-+][0-9]{4}", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Switzerland", "CountryCode": "CH", "Pattern": "[0-9]{3}\\.?[0-9]{2}\\.?[0-9]{3}\\.?[0-9]{3}", "Description": "Social Security Number (Old AVS format with personal data encoded)" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "Switzerland", "CountryCode": "CH", "Pattern": "756\\.?[0-9]{4}\\.?[0-9]{4}\\.?[0-9]{2}", "Description": "Social Security Number (New AVS format)" }, { "Name": "National identification number", "Category": "Personal", "Country": "United Kingdom", "CountryCode": "UK", "Pattern": "[A-CEGHJ-PR-TW-Z][A-CEGHJ-NPR-TW-Z]{1}[0-9]{6}[A-DFM]?", "Description": "" }, { "Name": "Social Security Number", "Category": "Personal", "Country": "United Kingdom", "CountryCode": "UK", "Pattern": "^([ACEHJLMOPRSW-Yacehjlmoprsw-y][A-CEGHJ-NPRSTW-Za-ceghj-nprstw-z]|[Bb][A-CEHJ-NPRSTW-Za-cehj-nprstw-z]|[Gg][ACEGHJ-NPRSTW-Zaceghj-nprstw-z]|[Kk][A-CEGHJ-MPRSTW-Za-ceghj-mprstw-z]|[Nn][A-CEGHJLMNPRSW-Za-ceghjlmnprsw-z]|[Tt][A-CEGHJ-MPRSTW-Za-ceghj-mprstw-z]|[Zz][A-CEGHJ-NPRSTW-Ya-ceghj-nprstw-y])[0-9]{6}[A-Da-d ]?$", "Description": "" }, { "Name": "UK NHS Number", "Category": "Personal", "Country": "United Kingdom", "CountryCode": "UK", "Pattern": "[0-9]{3}[ -]?[0-9]{3}[-]?[0-9]{4}", "Description": "" }, { "Name": "Zipcode", "Category": "Location", "Country": "Netherlands", "CountryCode": "NL", "Pattern": "^[1-9][0-9]{3} ?(?!sa|sd|ss|SA|SD|SS)[A-Za-z]{2}$", "Description": "" }, { "Name": "Zipcode", "Category": "Location", "Country": "Canada", "CountryCode": "CA", "Pattern": "^((\\d{5}-\\d{4})|(\\d{5})|([AaBbCcEeGgHhJjKkLlMmNnPpRrSsTtVvXxYy]\\d[A-Za-z]\\s?\\d[A-Za-z]\\d))$", "Description": "" }, { "Name": "Zipcode", "Category": "Location", "Country": "Germany", "CountryCode": "DE", "Pattern": "\\b((?:0[1-46-9]\\d{3})|(?:[1-357-9]\\d{4})|(?:[4][0-24-9]\\d{3})|(?:[6][013-9]\\d{3}))\b", "Description": "" }, { "Name": "Zipcode", "Category": "Location", "Country": "United Kingdom", "CountryCode": "UK", "Pattern": "([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\\s?[0-9][A-Za-z]{2})", "Description": "" }, { "Name": "Zipcode", "Category": "Location", "Country": "United States of America", "CountryCode": "US", "Pattern": "^((\\d{5}-\\d{4})|(\\d{5})|([A-Z]\\d[A-Z]\\s\\d[A-Z]\\d))$", "Description": "" } ] |