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

Find and replace with regex on does not allow replacing with \n #312

Closed
Tyriar opened this issue Nov 20, 2015 · 4 comments
Closed

Find and replace with regex on does not allow replacing with \n #312

Tyriar opened this issue Nov 20, 2015 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Nov 20, 2015

The same applies to \r and \t, not sure if there are any others.

Repro

  1. Open a file
  2. Ctrl+H to bring up find and replace
  3. Turn on regular expression matching
  4. Match a word
  5. Put \n in the replace text box
  6. Press Replace All

Expected

The matched words are replaced with new lines

Actual

The matched words are replaces with \n

@Tyriar
Copy link
Member Author

Tyriar commented Nov 23, 2015

Thanks for fixing this!

@alexdima alexdima added this to the Dec 2015 milestone Nov 25, 2015
@egamma
Copy link
Member

egamma commented Dec 14, 2015

When verifying this issue please also consider this test case: #1227 (comment)

@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Dec 14, 2015
@karlti
Copy link

karlti commented Dec 16, 2015

With version 0.10.4 the issue is partially solved.

That is, "Test Case 2" is solved.
Thanks for that!

"Test Case 1" is still open, in that searching for '\n' does not work.
Searching for '\t' works.

Furthermore '\r' is not recognized.
'\n' apparentely is the RexEx for CRLF....

@alexdima
Copy link
Member

@karlti thank you for verifying 👍. Let's track searching for \r and \n in #313

@jrieken jrieken assigned jrieken and unassigned alexdima Dec 16, 2015
@jrieken jrieken added the verified Verification succeeded label Dec 16, 2015
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 19, 2017
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 verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants