ballerina-platform / ballerina-spec

Ballerina Language and Platform Specifications
Other
168 stars 53 forks source link

[Match Statement][RegExp]Support regex patterns within match statement for strings #1272

Open pcnfernando opened 11 months ago

pcnfernando commented 11 months ago

Description: Raising to check whether as we now have data-tagged RegExp values, should this improvement be considered.

match text {
    re `pattern1` => {
        // Handle the match
    }

    re `pattern2` => {
        // Handle the match
    }

    _ => {
        // Handle cases that do not match any pattern
    }
}

Suggested Labels:

Code sample that shows issue:

Related Issues: