Hi Emmanuel,

Your regex has a typo, a missing dot at the beginning .*[+]? *((\([0-9- ]+\))|[0-9- ]+)+ I checked against your regex and it does work. However, when i searched for a telephoneNumber=1-801-555-1212, it fails. Below is the entry i used for my testing.

dn: cn=JSmith,ou=people,o=sevenSeas
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: top
cn: James Smith
cn: Jim Smith
cn: Jimmy Smith
cn: JSmith
givenname: James
givenname: Jim
givenname: Jimmy
mail: [email protected]
sn: Smith
telephonenumber: 1 801 555 1212
userpassword:: bmV3cGFzc3dvcmQ=


Emmanuel Lecharny wrote:
Cheong Chung Onn wrote:
Hi,

Is telephoneNumber match broken? If I would to search for a telephone number say telephoneNumber=1-801-555-1212, would this search yield a match if the entry's telephoneNumber is 1 801 555 1212?

I have tested it in the SevenSeas example, using the entry cn=JSmith,ou=people,o=sevenSeas. Searching for a telephoneNumber 1-801-555-1212 would yield false. Match will only be true, if the number is exactly the same as what is registered in the entry. Is this an expected behavior or is it broken?


There is a Jira closed with a test case in place on a similar issue https://issues.apache.org/jira/browse/DIRSERVER-311
Here is the regexp used to check telephoneNumber syntax :
*[+]? *((\([0-9- ]+\))|[0-9- ]+)+

Your number should pass.

Reply via email to