VS Code Regex find and replace with lowercase

你说的曾经没有我的故事 提交于 2020-03-04 03:50:11

问题


Is there a way to do a find and replace (regex) all uppercase characters in the matching strings with lowercase ones? Preferably in VS Code or IntelliJ I already have my regex ready.

Edit: To be cleare I already know who to find the matches. But looking for that function to replace all uppercase matches with lowercase ones


回答1:


  • Press Ctrl + F
  • Select .* and enter your RegEx
  • Press Ctrl + Shift + L (Select All)
  • Press Ctrl + Shift + P
  • Choose Transform to Lowercase



回答2:


Open the find & replace blade. (Ctrl. + F on windows)

On the blade look for an icon .*

Clicking the icon will configure the box to accept regex code.

You can then enter it from there.

EDIT: to replace all click the downer arrow & select Replaceall



来源:https://stackoverflow.com/questions/59785124/vs-code-regex-find-and-replace-with-lowercase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!