Skip to content

[Bug]: Using ` re \u{0028} ` causes runtime exception. #43672

Open
@gayaldassanayake

Description

@gayaldassanayake

Description

string:RegExp regBracketSplitter = re `\u{0028}`;
string[] descriptionParts = regBracketSplitter.split(description);

causes the below runtime error.

error: java.util.regex.PatternSyntaxException {"message":"Unclosed group near index 1
("}
        at ballerina.lang.regexp.0:split(regexp.bal:437)
           gayaldassanayake.dulaj.0:getCleanInvoiceItemDescription(main.bal:15)
           gayaldassanayake.dulaj.0:main(main.bal:10)

Steps to Reproduce

Do a bal run on the above sample code

Affected Version(s)

2201.10.x

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions