Check URL for string in a Twig file
Use the "in" operator: 

{% if '/services/' in url %}


More information: http://twig.sensiolabs.org/doc/templates.html#containment-operator

If you didn't do it already, put this preprocess function in the file mytheme.theme in your theme directory:

function mytheme_preprocess_page_title(&amp;$variables) {
  $variables['url'] = $_SERVER['REQUEST_URI'];
  $variables['#cache']['contexts'][] = 'url.path';
}


Edit:
By moving the code from page inside a block we need to provide a cache context.