From anonymous, 1 Month ago, written in Python.
Embed
  1. >>> from qutebrowser.utils import urlmatch
  2. >>> from PyQt5.QtCore import QUrl
  3. >>>
  4. >>> pattern = urlmatch.UrlPattern('*://*.example.com/*')
  5. >>> pattern.matches(QUrl('https://example.com/'))
  6. True
  7. >>> pattern.matches(QUrl('https://subdomain.example.com/'))
  8. True