Path prefix regex fails to identify an empty slash option

I am trying to write a regex to route certain routes, including a default /, but can’t seem to figure this out .
Trying in playground here , this should work /\W.*|(/mainApp/latest).*|(/js/).* (NOTE: I have a double slash in front of W when in yaml fail) , but when defined in yaml and applied , the default path / isn’t getting identified

I would like to route the following requests

  1. https://my.host.name/mainApp/latest
  2. https://my.host.name
  3. https://my.host.name/
  4. https://my.host.name/mainApp/latest/css/test.css
  5. https://my.host.name/js/main.5160ddad.js

but want to EXCLUDE a https://my.host.name/my-api-service from this regex (there is another Ingress defined for that)

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
 ....
spec:
  rules:
    - host: my.host.name
      http:
        paths:
          - path: /\\W.*|(/mainApp/latest).*|(/js/).*
            pathType: ImplementationSpecific
            ...
---

I did figure this out finally (right after posting the question) .
The solution is this regex /?$|(/mainApp/latest).*|(/js/).*