Python re.Search() Examples

The following are code examples for showing how to use re.Search(). They are extracted from open source Python projects. You can vote up the examples you like or vote down the exmaples you don't like. You can also save this page to your account.

Example 1
Project: plex-for-kodi-mod   Author: mrclemds   File: plexserver.py    (license) View Source Project 5 votes vote down vote up
def swizzleUrl(self, url, includeToken=False):
        m = re.Search("^\w+:\/\/.+?(\/.+)", url)
        newUrl = m and m.group(1) or None
        return self.buildUrl(newUrl or url, includeToken)