Skip to content

regexp lookBehind bug? #29462

Closed
Closed
@bluelovers

Description

@bluelovers
  • Version: v12.10.0
  • Platform: 64-bit (Windows)
  • Subsystem:

let txt = `「呀啊,居然能見到比自己還年輕的母親,時空穿梭真是恐怖呀」

「哈,哈……」

「呀啊,居然能見到比自己還年輕的母親,時空穿梭真是恐怖呀」

「哈,哈……」`;

console.dir(txt.replace(/(?<=^[][^\n]+[])\n\n(?=[][^\n]+[]$)/gm, '\n'));

in nodejs it can't handle when context in start of line

\n\n should is \n

image

in google chrome it work as expected

\n

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions