Repository: vscode
Issue: Cannot replace with positive lookbehind including `\n`
Labels: bug,editor-find

Type: <b>Bug</b>

I cannot replace regex `(?<=\n)b` to "BBB" in this text below:
```
a-b-c
a-b-d
a-b-e
a-c-d
a-c-e
a-d-e
b-c-d
b-c-e
b-d-e
c-d-e
```

Texts can be found like this.
![ss007 - ● a-b-c ？ Untitled-1 - Visual Studio Code](https://github.com/microsoft/vscode/assets/88940383/1614a4f8-f4c2-45d9-aae7-d1a2e9237abd)
But, single replace fails like this.
![ss008 - ● a-b-c ？ Untitled-1 - Visual Studio Code](https://github.com/microsoft/vscode/assets/88940383/11f6a9c4-25ec-4aa2-8dea-bf7d72098b16)

Using literal line break in regexp or using `LF` as line break code also fails.
![ss008 - ● a-b-c ？ Untitled-1 - Visual Studio Code](https://github.com/microsoft/vscode/assets/88940383/5e4ecbc3-2e92-4b2a-a0a5-efb9b1b55932)


This behavior only occurs with single replace. If I use multiple replace (Ctrl+Alt+Enter), the replace works correctly.
![ss004 - ● a-b-c ？ Untitled-1 - Visual Studio Code](https://github.com/microsoft/vscode/assets/88940383/9c74bc5d-d9a7-4540-8da2-3a389fc58733)

This behavior occurs when I use positive lookbehind with `\n`. If I use regexp without `\n` or without positive lookbehind, the replace works correctly.
![ss003 - ● a-b-c ？ Untitled-1 - Visual Studio Code](https://github.com/microsoft/vscode/assets/88940383/e0762a13-1b09-4cca-a646-dcb4640d1d36)
![ss001 - ● a-BBB-c ？ Untitled-1 - Visual Studio Code](https://github.com/microsoft/vscode/assets/88940383/0229fa24-5ce8-4d5f-8cad-0aef71f9eb45)
![ss002 - ● a-b-c ？ Untitled-1 - Visual Studio Code](https://github.com/microsoft/vscode/assets/88940383/62708a5f-5de4-4eac-b13f-60ccd619ca14)

----

I tried insider version with vscode.dev, but replace failed too.

Version: 1.84.0-insider
Commit: 35419fc016b8d3d5dbc59aa11a0be957b0897309
Date: 2023-10-27T10:40:56.515Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0

Version: 1.84.0-insider
Commit: 35419fc016b8d3d5dbc59aa11a0be957b0897309
Date: 2023-10-27T10:40:56.515Z (2 days ago)
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36

----


VS Code version: Code 1.83.1 (f1b07bd25dfad64b0167beb15359ae573aecd2cc, 2023-10-10T23:48:05.904Z)
OS version: Windows_NT x64 10.0.19045
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|7.90GB (1.18GB free)|
|Process Argv|--disable-extensions --crash-reporter-id 9963c767-2656-4ecc-b62b-9405d4b964a1|
|Screen Reader|no|
|VM|0%|
</details>Extensions disabled<details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263cf:30856253
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
3biah626:30602489
f6dab269:30613381
2i9eh265:30646982
showlangstatbar:30737416
0bi6i642:30841073
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
synctok:30869157
dsvsc013:30795093
dsvsc014:30804076
pythonmhint1:30842940
dsvsc015:30845448
pythontestfixt:30871694
pythonregdiag2:30871582
pyreplss1:30865275
pythoncet0:30874138
2e7ec940:30870395
pythontbext0cf:30864173

```

</details>

<!-- generated by issue reporter -->