
我有一個文檔,其中包含以下劃線(“_”)開頭的特定單字。我需要記事本++的正規表示式將其變更為大寫。
我已經嘗試過這個,但它不起作用:
_\w+
答案1
搜尋:
(_\w+)
替換為:
\U$1
……你就完成了! (請確保單擊左下角的“正規表示式”單選按鈕。)
我的測試如下。
前:
Hi, this is a test _with some _words starting _WITH _Underscores
Let's try to _toUpper them all!
後:
Hi, this is a test _WITH some _WORDS starting _WITH _UNDERSCORES
Let's try to _TOUPPER them all!
祝你好運!