Regular Expressions 101

Community Patterns

Local path

0

Regular Expression
Python

r"
^((?:~?\/)|(?:(?:\\\\\?\\)?[a-zA-Z]+\:))(?:\/?(.*))?$
"
gm

Description

  • C:/path
  • \?\C:[/]path
  • /path
  • ~/path
Submitted by anonymous - 6 years ago