Needs more backslashes
The backslash is treated as an escape character by both the regular expression engine and
Java.
Starting with you
pattern definition, if your intent is to match a backslash followed by a single digit, you need \\\\ (four backslashes) to match the single backslash.
Of course that leaves the single digit, which can be represented by the escape character \d BUT seen as Java will also treat that \ as the start of an escape charcater, you need to escape it by adding another \, yeielding \\d.
Putting that toghether gives you the pattern \\\\\\d (six backslashes in there).
Now, that will fix the pattern, but it still won't yield a result, because there's something amiss with the literal
String value you're trying to match against.
Why don't you try figuring out why that is from here
Edit: ugh, too slow.