Skip to content

Commit

Permalink
regex for CVV
Browse files Browse the repository at this point in the history
  • Loading branch information
DrJJ committed Oct 30, 2024
1 parent 2edcc19 commit 03f39be
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 15 deletions.
3 changes: 1 addition & 2 deletions examples/command-grammar-web-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions examples/micDemoWithOfflineDiarization/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions examples/microphone-websocket-node-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

166 changes: 159 additions & 7 deletions new-examples/pii_redaction/ol-from-url.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"sessions": [
{
"asyncMode": "OFF-LINE",
"audioChannelSelector": "two-channel",
#"audioChannelSelector": "two-channel",
"audioChannelSelector": "mix",
"poll": {
# will delete the session after 1 minute
"afterlife": 60000
Expand Down Expand Up @@ -100,15 +101,166 @@
"type": "redact",
"parameters": {
"CC": "[CC]",
"ZIP": "[ZIP]",
#"ZIP": "[ZIP]",
"PERSON": "[PERSON]",
"EMAIL" : "[EMAIL]",
"PHONE" : "[PHONE]",
"SSN" : "[SSN]",
#"EMAIL" : "[EMAIL]",
#"PHONE" : "[PHONE]",
"SSN" : "partial",
"DMY" : "[DMY]"
}
}
# ,
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bcv is )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bcv )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bcvv is )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bcvv )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bcv number is )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bcv number )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bcvv number is )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bcvv number )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bpin is )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bpin )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bpin number is )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bpin number )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bsecurity is )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bsecurity )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bsecurity pin is )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bsecurity pin )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bsecurity number is )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bsecurity number )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
},
{
"type": "regex",
"parameters": {
"pattern": r"(?<=\bsecurity number. )\d{3,4}\b",
"mask": "[CVV]",
"options": "IA"
}
} # ,
# {
# "type": "regex",
# "parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def make_request(self, method, url, json=None):
return response


TOTAL = 3
SLEEP = 8
TOTAL = 10
SLEEP = 7
for _ in range(TOTAL):
api_client = ApiClient()
api_client.dial(
Expand Down

0 comments on commit 03f39be

Please sign in to comment.