0

I can send, receive and parse SOAP requests with our exchange 2013 server via the FindItem action.
My goal is searching for all contacts that have a certain phone number.
Contacts on our exchange server can have any random format you can imagine and some that you can't imagine, the creativity in this area seems to be infinite. I have even seen NAMES and EMAILS ending up in phone fields.

Just a few examples of what I have seen:
+436763400513
006763400513
06763400513
0676-34-00-513
0676/34-00-513


The number I would have when searching for this one would be "06763400513". Is there any way to search through our exchange with EWS so that I can find all variants of that number?
Like regex support?

I am not supposed to use the managed API classes.

If anyone has a better suggestion for the tile go ahead and change it!

please don't call me

ASA
  • 1,911
  • 3
  • 20
  • 37
  • `+436763400513|006763400513|06763400513|0676-34-00-513|0676/34-00-513`? ;) – sp00m Nov 19 '13 at 14:26
  • Sp00m, I am not struggling with the regex, but rather how I use any regex in combination with an EWS SOAP request. See my comment to Voidpaw below. – ASA Nov 19 '13 at 14:35
  • @Alex Filipovici, yes this question is essentially a duplicate of mine, I want to avoid unnecessary work for the client and minimize network bandwidth usage etc. Is there nothing new for this in Exchange 2013? It looks like a basic feature to me. – ASA Nov 19 '13 at 14:36

1 Answers1

0

Unfortunately: EWS does not support Regex. Similar question here

Community
  • 1
  • 1
Voidpaw
  • 910
  • 1
  • 5
  • 18
  • Are you sure that it's possible to use regex with EWS? Take a look at the answer to the duplicate question candidate in my comment. – Alex Filipovici Nov 19 '13 at 14:29
  • I am sorry, I kinda blew it there :( I will change the post straight away – Voidpaw Nov 19 '13 at 14:32
  • Ok, but why shouldn't be this edited answer an actual comment? :) – Alex Filipovici Nov 19 '13 at 14:33
  • I am not struggling with creating a proper regex to fulfill my goal, what I want is to know, if regex works with EWS, where do I put my regex?

    A FindItems request, with a Restriction or QueryString?
    If it is an Restriction, then what child do I use? "IsEqualTo"?

    So I'd use something like IsEqualTo and simply compare all phone number fields with my regex?
    – ASA Nov 19 '13 at 14:34
  • I changed my comment, as it is unfortunately not possible to use Regex in EWS. I honestly thought it was, but I started doubting myself after @AlexFilipovici wrote his comment, so I searched and found that it wasn't. – Voidpaw Nov 19 '13 at 14:36