replace slashes with single quote for regex delimiter