<p>I'm getting the following error when using regex. I want to filter based on the query string to send the traffic to a different port.</p>
<pre><code>controller.go:217] kubebuilder/controller &quot;msg&quot;=&quot;Reconciler error&quot; &quot;error&quot;=&quot;failed to reconcile listeners due to failed to reconcile rules due to failed creating rule 1 on arn:aws:elasticloadbalancing:ap-south-1:1234:listener/app/51233e9-testwebdev-test-1eb8/1234 due to ValidationError: Condition value '/(action=.*\u0026uid.*test=[0-9]+)|test|status\u0026uid)' contains a character that is not valid\n\tstatus code: 400, request id: 664231b0-7c95-4ee6-a14b-fb83e9d7590a&quot;  &quot;controller&quot;=&quot;alb-ingress-controller&quot; &quot;request&quot;={&quot;Namespace&quot;:&quot;test-web-dev&quot;,&quot;Name&quot;:&quot;test-ingress-dev&quot;
</code></pre>
<p>The path has regex as shown below</p>
<pre><code>  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;
    ....

  paths:
    - path: &quot;/.*(action=.*&amp;uid.*test=[0-9]+)|(test|status&amp;uid)&quot;
      backend:
        serviceName: httpd
        servicePort: 1234
    - path: /
      backend:
        serviceName: httpd
        servicePort: 443
</code></pre>

user630702
<p>As I see your manifests, your Ingress is configured as AWS ALB instead of NGINX due to <code>kubernetes.io/ingress.class: alb</code>. So you should configure AWS path condition compliance, refer <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#path-conditions" rel="nofollow noreferrer">Path Conditions</a> for more details. AFAIK, AWS ALB regex is supported partially, not full regex.</p>
<pre><code>A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters.

1. A–Z, a–z, 0–9

2. _ - . $ / ~ &quot; ' @ : +

3. &amp; (using &amp;amp;)

4. * (matches 0 or more characters)

5. ? (matches exactly 1 character)
</code></pre>
