Skip to content

Transform regex with 'su' flag, using dotAllFlag=false #26

@meowtec

Description

@meowtec
rewritePattern('hello.world', 'su', {
  dotAllFlag: false,
})
/hello.world/su.test('hello\nworld') 
// should output: true
/hello(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])world/s.test('hello\nworld'))
// but output: false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions