Skip to content

sidd34/pii

Repository files navigation

The Regex PII detection

  1. It uses regex to detect pii
  2. The regex code is in utils.ts
  3. The detection code is in detetion.ts
  4. The file data.ts is used for dummy data

How to run?

tsc detection.ts --resolveJsonModule

node detection.js

PII regex & It's origin

PII Name Regex Source Is modified
Name ^[a-zA-Z\\s'-]+$ LINK YES
Indian Phone Number ^(?:\+91\\0)?[6789]\\d{9}$ LINK YES
Bank Account Number ^\d{18}$ LINK NO
Credit Card Number 1692005854489 LINK NO
User Email [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ LINK YES
Address ^(\d{1,}) [a-zA-Z0-9\s]+(\,)? [a-zA-Z]+(\,)? [A-Z]{2} [0-9]{5,6}$ LINK NO
IP Address 1691865060070 LINK NO
MAC Address 1691865123714 LINK NO
IMSI ^[0-9]{5,15} LINK NO
PAN CARD [A-Z]{5}[0-9]{4}[A-Z]{1} LINK NO
Debit Card 1692005800039 LINK NO
Browser Name 1692005876622 LINK NO
OS name 1692005904532 LINK YES
Date \d{1,2}\/\d{1,2}\/\d{2,4} LINK YES
Zip code ^[0-9]{5}(?:-[0-9]{4})?$ LINK NO
SSN 1692005992823 LINK NO
International Driving License 1692006028376 LINK YES
Gender 1692006063514 LINK NO
International Passport number 1692006152977 LINK NO
Financial information 1692006174499 LINK YES
Geolocation (Latitude) 1692006192690 LINK NO
Geolocation (Longitude) 1692006214301 LINK NO
URL 1692006237687 LINK NO
Indian Vehicle Registration Number 1692006317047 LINK NO
IMEI \d{2}-\d{6}-\d{6}-\d{2} LINK NO
Addhar Card ^d{4}sd{4}sd{4}$ LINK YES
International Phone Number 1692007776403 LINK NO

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published