Regex escapes "\" inconsistently respected PUT to /projects/:id/push_rule

Summary

Regex escapes \ inconsistently respected with API /projects/:id/push_rule

Steps to reproduce

error type 1

the escape \\d+ is not respected same as at feat\/

curl -X PUT gitlab.corp.com/api/v4/projects/:id/push_rule \
  -d '{
    "branch_name_regex": "feat\/[a-z]\\d+",
   }'
What is the current bug behavior?

response

{
    "branch_name_regex": "feat/[a-z]\\d+",
 }
What is the expected correct behavior?

response

{
    "branch_name_regex": "feat/[a-z]\d+",
 }

error type2

curl -X PUT gitlab.corp.com/api/v4/projects/:id/push_rule \
  -d '{
    "branch_name_regex": "feat\/[a-z]\d+",
   }'
What is the current bug behavior?

response

{
    "branch_name_regex": "feat/[a-z]d+",
 }
What is the expected correct behavior?

I say this is more expected than what error type 1.

Example Project

ee 11.11.5

Edited by Jamie Reid