Skip to content

[typescript-angular] Invalid regular expression error #6566

@kimamula

Description

@kimamula
Description

The code generated from the following template results in a runtime error, Invalid regular expression: /(?i)^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$/: Invalid group

const jsonMime: RegExp = new RegExp('(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$');

Swagger-codegen version

Master branch (2.3.0)

Steps to reproduce

Paste the regular expression in Chrome Developer console, and Chrome raises the syntax error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions