fixing resource match so it works when the option has a backslash