SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to filter a rest request and get the opposite of:

filter=substringof('foo', Title)

I've tried with a leading "not" and also ending with "eq false" but those it seems are not valid queries. I guess what I'm really lacking is a complete documentation of the filter regular expression syntax.

share|improve this question

It seems like there is a bug with substringof operator in REST/OData web service implementation.


When applying substringof operator to a list items using the following syntax:

/_api/web/lists/getbytitle('Contacts')/items?$filter=substringof('John', Title) eq false

an error occurs:

    <m:code>-1, Microsoft.SharePoint.SPException</m:code>
    <m:message xml:lang="en-US">The query is not valid.</m:message>


You could target the listdata.svc where substringof operator could be applied successfully.


/_vti_bin/listdata.svc/Contacts?$filter=substringof('Jane',LastName) eq false
share|improve this answer

The figure below shows the supported OData query options and how to specify supported filters enter image description here

You can find the full documentation here.

The following Url is working fine at my end:

_api/web/Lists?$filter=substringof('Documents',Title) eq false
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.