# Broken config in a yaml config file
#
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: bad-match
spec:
  hosts:
  - "*"
  gateways:
  - bookinfo-gateway
  http:
  - match:
    - uri:
        regex: "[A-Z"
    route:
    - destination:
        host: productpage
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: valid-regexp
spec:
  hosts:
  - "*"
  gateways:
  - bookinfo-gateway
  http:
  - match:
    - uri:
        regex: "[A-Z]"
    route:
    - destination:
        host: productpage
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: ecma-not-v2
spec:
  hosts:
  - "*"
  gateways:
  - bookinfo-gateway
  http:
  - match:
    - uri:
        regex: "^(?!.<path to match here>.).*"
    route:
    - destination:
        host: productpage
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: no-regexes
spec:
  hosts:
  - "*"
  gateways:
  - bookinfo-gateway
  http:
  - route:
    - destination:
        host: productpage
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: lots-of-regexes
spec:
  hosts:
  - "*"
  gateways:
  - bookinfo-gateway
  http:
  - match:
    - uri:
        regex: "[A-Z"
    - scheme:
        regex: "[A-"
    - authority:
        regex: "[A-B"
    - headers:
        end-user:
          regex: "[jason-"
    - queryParams:
        zipcode:
          regex: "[1-"
    corsPolicy:
      allowOrigins:
      - regex: "[O-R"
    route:
    - destination:
        host: productpage
