<!--

Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
Don't worry if they're not all applicable; just try to include what you can :-)

If you need to include code snippets or logs, please put them in fenced code
blocks.  If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>

Please delete these comment blocks before submitting the issue.

-->

<!--

IMPORTANT!!!

PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!

PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!

Please complete the next sections or the issue will be closed.
These questions are the first thing we need to know to understand the context.

-->

**Apache Airflow version**: 1.10.12


**Kubernetes version (if you are using kubernetes)** (use `kubectl version`):

**Environment**:

- **Cloud provider or hardware configuration**: AWS MWAA
- **OS** (e.g. from /etc/os-release):
- **Kernel** (e.g. `uname -a`):
- **Install tools**:
- **Others**:

**What happened**: In a DAG, we implemented an S3KeySensor with a wildcard.  This was meant to match an S3 object whose name could include a variable digit.  Using an asterisk in our name, we could detect the object, but when instead we used [0-9] we could not.

<!-- (please include exact error messages if you can) -->

**What you expected to happen**: S3KeySensor bucket_key should be interpretable as any valid Unix wildcard pattern, probably as defined here: https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm or something similar.

<!-- What do you think went wrong? -->

I looked into the source code and have tracked this to the `get_wildcard_key` function in `S3_hook`: https://airflow.apache.org/docs/apache-airflow/1.10.14/_modules/airflow/hooks/S3_hook.html.
This function works by iterating over many objects in the S3 bucket and checking if any matches the wildcard.  This checking is done with `fnmatch` that does support ranges.

The problem seems to be in a performance optimization.  Instead of looping over all objects, which could be expensive in many cases, the code tries to select a Prefix for which all files that could meet the wildcard would have this prefix.  This prefix is generated by splitting on the first character usage of `*` in the `wildcard_key`.  That is the issue.

It only splits on `*`, which means if `foo_[0-9].txt` is passed in as the `wildcard_key`, the prefix will still be evaluated as `foo_[0-9].txt` and only objects that begin with that string will be listed.  This would not catch an object named `foo_0`.

I believe the right fix to this would either be:
1. Drop the performance optimization of Prefix and list all objects in the bucket
2. Make sure to split on any special character when generating the prefix so that the prefix is accurate

**How to reproduce it**:  This should be reproduceable with any DAG in S3, by placing a file that should meet set off a wildcard sensor where the wild-card includes a range.  For example, the file `foo_1.txt` in bucket `my_bucket`, with an S3KeySensor where bucket_name='my_bucket', bucket_key='foo_[0-9].txt`, and wildcard_match=True
<!---

As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.

If you are using kubernetes, please attempt to recreate the issue using minikube or kind.

## Install minikube/kind

- Minikube https://minikube.sigs.k8s.io/docs/start/
- Kind https://kind.sigs.k8s.io/docs/user/quick-start/

If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action

You can include images using the .md style of
![alt text](http://url/to/img.png)

To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.

--->


**Anything else we need to know**: This problem will occur every time

<!--

How often does this problem occur? Once? Every time etc?

Any relevant logs to include? Put them here in side a detail tag:
<details><summary>x.log</summary> lots of stuff </details>

-->

airflow/providers/amazon/aws/hooks/s3.py
:param input_serialization: S3 Select input data serialization format
        :type input_serialization: dict
        :param output_serialization: S3 Select output data serialization format
        :type output_serialization: dict
        :return: retrieved subset of original data by S3 Select
        :rtype: str
        .. seealso::
            For more details about S3 Select parameters:
            http://boto3.readthedocs.io/en/latest/reference/services/s3.html#S3.Client.select_object_content
        """
        expression = expression or 'SELECT * FROM S3Object'
        expression_type = expression_type or 'SQL'
        if input_serialization is None:
            input_serialization = {'CSV': {}}
        if output_serialization is None:
            output_serialization = {'CSV': {}}
        response = self.get_conn().select_object_content(
            Bucket=bucket_name,
            Key=key,
            Expression=expression,
            ExpressionType=expression_type,
            InputSerialization=input_serialization,
            OutputSerialization=output_serialization,
        )
        return b''.join(
            event['Records']['Payload'] for event in response['Payload'] if 'Records' in event
        ).decode('utf-8')
    @provide_bucket_name
    @unify_bucket_name_and_key
    def check_for_wildcard_key(