Learn the necessary information in generating standard patterns for Data Loss Prevention (DLP) Spanish (ES) region.
Spanish telephone numbers
The following patterns are used to create the provided regular expression:
Use "9" as the first digit and use one or two numbers for the city prefix, then followed by 7 digits for the number.
- 9x -xxx xx xx
- 9xx -xxx xx xx
- (9x) xxx xx xx
- (9xx) xxx xx xx
Regular expression:
[^\d]([(9]+\d{1,2}\)?[-\s]+[\d\s]{7,9})[^\d]
Mobile numbers
Use "6" or "7" as the first digit, and 8 additional digits in this format:
- 6xx xxx xxx
- 7xx xxx xxx
Regular expressions:
[^\d]([67][\d\s]{7,10})[^\d]
[^\d]([67]\d\d\s\d{3}\s\d{3})[^\d]
European monetary numbers
The European monetary numbers are separated with comma for the decimals, and dot for the thousands, followed by a euro symbol.
For example: 1.064,32 € (one thousand and sixty four euros and thirty two cents)
Regular expression:
[^\d]((\d{1,3}\.(\d{1,3}\.)?)?\d{1,3}(,\d{2})?\s?€)
Spanish credit card numbers
- VISA
VISA numbers are 4x groups of 4x digits (total of 16 digits) and starts with "4".
For example: 4xxx xxxx xxxx xxxx
Regular expression:
[^\d](4\d{3}\s?\d{4}\s?\d{4}\s?\d{4})[^\d]
- Master Card
Master Card numbers are 4x groups of 4x digits (16 digits) and starts with "5". They have secondary number of either 1,2,3,4 or 5.
- 51xx xxxx xxxx xxxx
- 52xx xxxx xxxx xxxx
- 53xx xxxx xxxx xxxx
- 54xx xxxx xxxx xxxx
- 55xx xxxx xxxx xxxx
Regular expression:
[^\d](5[12345]\d{2}\s?\d{4}\s?\d{4}\s?\d{4})[^\d]