You pass it the name of the regular expression to the function? The function doesn't work that way, you can only directly pass it regular expressions. Now it will to match everything against the name of your regular expression :).
The function is there because it existed before isMatch, and in that respect it is obsolete now.
Note that the regex replace function of the module and runtime do defer with respect to their replacement value handling.
With the help of a regex tester: in java you need to escape back slashes to get a backslash in a string:
^(20)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])\\d\\d\\d\\d.pdf