opened
nathan5280
username_0
<!--
Please follow the issue template below for bug reports.
Also please indicate in the issue title which language/library is concerned. Eg:  [BUG][JAVA] Bug generating foo with bar 
-->
Generators aren't consistently escaping the regex patterns for python and python-flask.

##### Description
openapi-codegen  python and python-flask generate different regex escapes.

Generated Client
```python
        if business_addr_zip is not None and not re.search(r'^\d{5}(?:[-\s]\d{4})?$', business_addr_zip):  # noqa: E501
```
Generated Server
```python
        if business_addr_zip is not None and not re.search(r'^\\d{5}(?:[-\\s]\\d{4})?$', business_addr_zip):  # noqa: E501
```
The client seems fine, but the server is double escaped.

<!-- describe what is the question, suggestion or issue and why this is a problem for you. -->

##### openapi-generator version

<!-- which version of openapi-generator are you using, is it a regression? -->
docker image https://hub.docker.com/r/openapitools/openapi-generator-cli/

##### OpenAPI declaration file content or url
Specification:
```yaml
    PlaceQuery:
      properties:
        data:
          properties:
            entity_name:
              type: string
            physical_address:
              properties:
                business_addr_zip:
                  pattern: ^\d{5}(?:[-\s]\d{4})?$
                  type: string
              required:
                - business_addr_zip
              type: object
          required:
            - entity_name
            - physical_address
          type: object
      required:
        - data
      type: object
```

<!-- if it is a bug, a json or yaml that produces it.
If you post the code inline, please wrap it with
```yaml
(here your code)
```
(for YAML code) or
```json
(here your code)
```
(for JSON code), so it becomes more readable. If it is longer than about ten lines,
please create a Gist (https://gist.github.com) or upload it somewhere else and
link it here.
  -->

##### Command line used for generation

<!-- including the language, libraries and various options -->

##### Steps to reproduce

<!-- unambiguous set of steps to reproduce the bug.-->

##### Related issues/PRs

<!-- has a similar issue/PR been reported/opened before? Please do a search in https://github.com/openapitools/openapi-generator/issues?utf8=%E2%9C%93&q=is%3Aissue%20 -->

##### Suggest a fix

<!-- if you can't fix the bug yourself, perhaps you can point to what might be
  causing the problem (line of code or commit), or simply make a suggestion -->
[BUG] Python pattern re.search('r incorrect in generated server model
issue
closed
wing328
username_1
issue