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

Regular replacement #48877

Closed
azbo opened this issue Apr 28, 2018 · 2 comments
Closed

Regular replacement #48877

azbo opened this issue Apr 28, 2018 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-find Editor find operations

Comments

@azbo
Copy link

azbo commented Apr 28, 2018

  • VSCode Version:1.22.2
  • OS Version:windows10

Steps to Reproduce:

1.Regular replacement
setResourceId;
setResourceType;
image

\w+.\w+;\s+

“\s+” The newline character cannot be identified normally

Does this issue occur when all extensions are disabled?: Yes/No

@vscodebot vscodebot bot added editor editor-core Editor basic functionality labels Apr 28, 2018
@tommai78101
Copy link

No, that is correct:

https://regex101.com/r/8oGY0E/1

@alexdima
Copy link
Member

@azbo I'm guessing you expect \s to also match the EOL sequence, \n or \r\n, depending on the file.

The reason is because we don't switch on the multi-line flag for the regular expression in this case. The workaround is to use \w+.\w+;[\s\n]+ (manually write \n in there). This gives us a hint to enable the multi-line flag for the regex.

Duplicate of #9051

@alexdima alexdima added editor-find Editor find operations *duplicate Issue identified as a duplicate of another issue(s) and removed editor editor-core Editor basic functionality labels Apr 30, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-find Editor find operations
Projects
None yet
Development

No branches or pull requests

3 participants