title: Filter AWS resources using regex in aws-sdk-go
body: <p>So I have some different types of aws resources tagged as <code>xxx/yyy/&lt;generated_id&gt;</code>. I need to fetch them using go-sdk.</p>
  
  <p>Here is a sample code for subnets, the filters look the same for every other resource. </p>
  
  <p>This doesn't work.</p>
  
  <pre><code>var resp *ec2.DescribeSubnetsOutput
  resp, err = d.ec2Client().DescribeSubnets(&amp;ec2.DescribeSubnetsInput{
      Filters: []*ec2.Filter{
          {
              Name:   aws.String("vpc-id"),
              Values: []*string{&amp;d.VpcId},
          },
          {
              Name:   aws.String(fmt.Sprintf(`tag:"xxx/yyy.[*]"`),
              Values: []*string{aws.String("owned")},
          },
      },
  })
  </code></pre>
  
  <p>This does:
  <code>
  aws ec2 describe-subnets --filters `Name=tag:"xxx/yyy.[*]",Values=owned`
  </code></p>
  
  <p>I'm obviously doing something wrong, can someone point out what?</p>