Skip to content

Instantly share code, notes, and snippets.

@w-jerome
Created June 13, 2018 13:17
Show Gist options
  • Save w-jerome/9d1819a160d4def70b948b621c16fd64 to your computer and use it in GitHub Desktop.
Save w-jerome/9d1819a160d4def70b948b621c16fd64 to your computer and use it in GitHub Desktop.
Regex — Tips
# https://fr.wikipedia.org/wiki/Expression_r%C3%A9guli%C3%A8re
# [^liste] Un caractère n'étant pas entre crochets ("classe de caractères")
# ([^/]+) prend tout les caractères jusqu'au prochain slash
# /actualites/international/the-world-change-now-with-regex
^/actualites/([^/]+)/([^/]+)$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment