Skip to content

RegExp substring replace does not work for new Global Search&Replace #9010

@nsgundy

Description

@nsgundy
  • VSCode Version: 1.3.0
  • OS Version: Win10

Steps to Reproduce:
File contents:

let fs = require('fs');
  1. Start Global Search&Replace CTRL+SHIFT+H
  2. For the search term use let\s+(\w+)\s*=\s*require\s*\(\s*['"]([\w\.\-/]+)\s*['"]\s*\)\s*;
  3. For the replace term use import * as $1 from '$2';

Issue:

When replacing, the file looks like this:

import * as $1 from '$2';

Expected

import * as fs from 'fs';

Note: This works using Local Search&Replace (CTRL+H).

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalitysearchSearch widget and operation issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions