you need to escape the paths with ``preg_quote`` before putting them in a regex