Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex search/replace bug in replace #165216

Closed
h8nor opened this issue Nov 2, 2022 · 6 comments
Closed

Regex search/replace bug in replace #165216

h8nor opened this issue Nov 2, 2022 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@h8nor
Copy link

h8nor commented Nov 2, 2022

Does this issue occur when 
all extensions are disabled?:
Yes
VS Code Version: 1.71.2
OS Version: Windows 10 21H1 Build 19043

Example

;TEST
;S:001
;DONE:1.1
;TEST
;S:002
;DONE:2.22
;TEST
;S:003
;DONE:3.333
Regex Enabled: Yes
Search: (?<=;TEST\n);S:\d+\n;(DONE:\d\.\d{1,2})(\d+)?
Replace: $1
          
🏳️ Expected Result:
🚩 Actual Result:
Toggle search area only
                        ;TEST
                        ;S:001
                        ;DONE:1.1
                        ;TEST
                        ;S:002
                        ;DONE:2.22
                        ;TEST
                        ;S:003
                        ;DONE:3.333
;TEST
-;S:001
-;DONE:1.1
+DONE:1.1
;TEST
-;S:002
-;DONE:2.22
+DONE:2.22
;TEST
-;S:003
-;DONE:3.333
+DONE:3.33
@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.72.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@h8nor
Copy link
Author

h8nor commented Nov 2, 2022

Updated to version 1.72.2. The issue persists.

Can you also increase the search/replace field by 20% to the left?

@roblourens roblourens assigned andreamah and unassigned roblourens Nov 2, 2022
@andreamah andreamah added search Search widget and operation issues bug Issue identified by VS Code Team member as probable bug labels Nov 7, 2022
@andreamah
Copy link
Contributor

Are you talking about the search/replace within a file?
image

Or the global one?
image

Also, what do you mean "Toggle search area only"? How is this different than what you expect?

Can you also increase the search/replace field by 20% to the left?

We currently don't have plans to change the positioning in the core editor. There may be extensions that can change that for your layout if you want.

@andreamah andreamah added the info-needed Issue requires more information from poster label Dec 6, 2022
@h8nor
Copy link
Author

h8nor commented Dec 7, 2022

Are you talking about the search/replace within a file?

Yep, about this subj

Also, what do you mean "Toggle search area only"?

Groups found are not replaced. Text are simply selected in turn

How is this different than what you expect?

Expected result after replacement all text

;TEST
DONE:1.1
;TEST
DONE:2.22
;TEST
DONE:3.33

@andreamah andreamah removed the search Search widget and operation issues label Dec 7, 2022
@andreamah
Copy link
Contributor

andreamah commented Dec 7, 2022

looping in @rebornix for find functionality within editors

@vscodenpa
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants