Repository navigation
Closed
Labels
Milestone
Description
Issue Type: Bug
- Create a new file with the contents "var(--foo-bar)"
- Find/Replace:
var\(--([a-z\-]+)\)with$$1. Results in replacement with$$1literally.\$$1results in\$1literally.$1properly results infoo-bar.
There seems to be no combination that will result in replacing w/ $foo-bar
VS Code version: Code 1.39.2 (6ab5985, 2019-10-15T15:33:00.827Z)
OS version: Darwin x64 19.0.0
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2700) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: enabled oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_deferred_display_list: disabled_off skia_renderer: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | 2, 2, 3 |
| Memory (System) | 16.00GB (0.24GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
Extensions (36)
| Extension | Author (truncated) | Version |
|---|---|---|
| glo-vs-code | Axo | 0.1.2 |
| ng-template | Ang | 0.802.3 |
| vscode-color | ans | 0.4.5 |
| npm-intellisense | chr | 1.3.0 |
| vscode-eslint | dba | 1.9.1 |
| xml | Dot | 2.5.0 |
| gitlens | eam | 10.1.1 |
| tslint | eg2 | 1.0.44 |
| vscode-npm-script | eg2 | 0.3.9 |
| prettier-vscode | esb | 2.3.0 |
| auto-rename-tag | for | 0.1.0 |
| todo-tree | Gru | 0.0.160 |
| Angular2 | joh | 8.1.1 |
| graphql-for-vscode | kum | 1.15.1 |
| dotenv | mik | 1.0.1 |
| vscode-docker | ms- | 0.8.1 |
| mssql | ms- | 1.7.0 |
| cpptools | ms- | 0.26.0 |
| debugger-for-chrome | msj | 4.12.0 |
| vscode-ios-common-files | Ort | 1.0.5 |
| material-icon-theme | PKi | 3.9.1 |
| swaggitor | qns | 0.1.1 |
| ruby | reb | 0.25.3 |
| java | red | 0.51.0 |
| vscode-yaml | red | 0.5.3 |
| jenkinsfile-support | sec | 0.1.0 |
| code-settings-sync | Sha | 3.4.3 |
| nativescript | Tel | 0.10.2 |
| vscode-status-bar-format-toggle | tom | 2.0.0 |
| vscodeintellicode | Vis | 1.2.0 |
| vscode-java-debug | vsc | 0.22.0 |
| vscode-java-dependency | vsc | 0.6.0 |
| vscode-java-pack | vsc | 0.8.0 |
| vscode-java-test | vsc | 0.20.0 |
| vscode-maven | vsc | 0.19.1 |
| propertylist | zho | 0.0.2 |
(2 theme extensions excluded)
Reacted by Snir Broshi
Activity
ArturoDent commentedon Oct 20, 2019
Try
$$$1From https://www.regular-expressions.info/replacecharacters.html
joeflateau commentedon Oct 20, 2019
huh ArturoDent that does work. I thought I had tried that already. I'll leave this open because I would expect
\$to also work. But thank you!Simran-B commentedon Dec 13, 2019
For clarity:
var(--foo-bar)var\(--([a-z\-]+)\)$$$1$foo-bar✔var(--foo-bar)var\(--([a-z\-]+)\)\$$1\$foo-bar❓$foo-bar👍Should
\$foo-barbe desired, then that should still be possible even if\$is made an alternative to$$for a literal dollar sign, using an escaped backslash:var(--foo-bar)var\(--([a-z\-]+)\)\\\$$1or\\$$$1\\$foo-baror$foo-bar$foo-baror$foo-barThis sounded like a bug to me. Two dollar signs should result in a literal $. The actual behavior seems to be correct in VSCode 1.41, so I assume it was either broken in a previous version but fixed or a typo in the original post.
var(--foo-bar)var\(--([a-z\-]+)\)$$1$1✔