I wrote code for matching filepath which have extenstion .ncx ,

```
 pattern = Pattern.compile("$(\\|\/)[a-zA-Z0-9_]/.ncx");
 Matcher matcher = pattern.mather("\sample.ncx");

```

This shows a invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ ) syntax error pattern. How can I fix it.