How to use "\" in pattern?

When i am use ascii value of "\ "or escape sequence like “\” then it is showing error :-bad pattern.
How to solve this issue?

The YANG RFC point to for defining regular expressions, where you can read that ‘\’ is a metacharacter and which single character escape·s are:

So ‘\’ need to be escaped to ‘\\’, and ‘\’ is not a valid single character escape.

Note that you should use single ticks ' around your pattern, not double ticks ".