-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_mapping.php
26 lines (23 loc) · 1.13 KB
/
test_mapping.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
$path = 'mappingfile-prod.json';
$jsonString = file_get_contents($path);
$jsonData = json_decode($jsonString, true);
'@.shh.se', '[email protected]', '@...se', '@...shh.se', '@...sunet.se.', '@...sunet.se...', '[email protected]', 'sunet.se', '.sunet.se', '.sunet.se.',
foreach ($users as &$user)
{
foreach ($jsonData as $regex => $node) {
// printf("Testing regex: %s\n", $regex);
if (preg_match($regex, $user, $matches) === 1)
{
printf("%35s: %s\n", $user, $node );
break;
}
}
}
?>