IssueRaiser

Regex Find/Replace with named capture groups

Type: <b>Bug</b> The replace field in the tool fails to parse most syntax related to regex substitutions beyond the basic numbered capture groups. There are several issues opened for closely related problems with find replace that are probably the same issue (incomplete/broken implementation of regex in the replace field) but they're not an exact match. To Reproduce: Create a find regex with a named capture group that should match with the find/replace tool bound to ctrl+f. E.g.: ``` text in file: beforetextToMatchAndCaptureafter find: before(?<myNamedGroup>textToMatchAndCapture)after replace: $<myNamedGroup> expected: the captured text between the (), literally "textToMatchAndCapture" actual: the literal $<myNamedGroup> ``` related: $1 does the substitution correctly. VS Code version: Code 1.82.0 (8b617bd08fd9e3fc94d14adb8d358b56e3f72314, 2023-09-06T22:07:18.759Z) OS version: Linux x64 5.10.0-25-amd64 Modes: <details> <summary>System Info</summary> |Item|Value| |---|---| |CPUs|AMD Ryzen 9 7950X 16-Core Processor (8 x 4500)| |GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<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: disabled_software<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off| |Load (avg)|0, 0,

Posted by joshuaking-madtech on Oct 16, 2023, 7:42 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

reliability (Sysadmin)

Regex Find/Replace with named capture groups

joshuaking-madtechOct 16, 2023, 7:42 PM

Type: <b>Bug</b> The replace field in the tool fails to parse most syntax related to regex substitutions beyond the basic numbered capture groups. There are several issues opened for closely related problems with find replace that are probably the same issue (incomplete/broken implementation of regex in the replace field) but they're not an exact match. To Reproduce: Create a find regex with a named capture group that should match with the find/replace tool bound to ctrl+f. E.g.: ``` text in file: beforetextToMatchAndCaptureafter find: before(?<myNamedGroup>textToMatchAndCapture)after replace: $<myNamedGroup> expected: the captured text between the (), literally "textToMatchAndCapture" actual: the literal $<myNamedGroup> ``` related: $1 does the substitution correctly. VS Code version: Code 1.82.0 (8b617bd08fd9e3fc94d14adb8d358b56e3f72314, 2023-09-06T22:07:18.759Z) OS version: Linux x64 5.10.0-25-amd64 Modes: <details> <summary>System Info</summary> |Item|Value| |---|---| |CPUs|AMD Ryzen 9 7950X 16-Core Processor (8 x 4500)| |GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<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: disabled_software<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off| |Load (avg)|0, 0,

Comments (0)

No comments yet. Start the discussion.

Comment on this issue