You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Notepad++中字符后转大写及冒号后字母转大写的实现方法

Hey there! Let's break down how to solve your two Notepad++ tasks easily using regular expression replacements—they're perfect for these kinds of text transformations.

1. Convert content after each character to uppercase in Notepad++

If you mean converting all content after the first character of each line to uppercase (e.g., turning hello world into hELLO WORLD), here's how to do it:

  • Open your file in Notepad++ and press Ctrl+H to open the Replace dialog.
  • At the bottom left, check the Regular expression option (and uncheck ". matches newline" if it's selected).
  • In the Find what field, enter: ^(.)(.*)$
  • In the Replace with field, enter: $1\U$2
  • Click Replace All to apply the change to your entire document.

How this works:

  • ^(.) captures the first character of each line.
  • (.*) captures all remaining content on the line.
  • \U$2 converts the captured remaining content to uppercase, while $1 keeps the first character as-is.

2. Capitalize the first letter after every colon (:) in each line

For your specific example (turning nerd:class:ace make:milk lake:cake into nerd:Class:Ace make:Milk lake:Cake), follow these steps:

  • Open your file in Notepad++ and press Ctrl+H to open the Replace dialog.
  • Check the Regular expression option (leave ". matches newline" unchecked).
  • In the Find what field, enter: :\K([a-z])
  • In the Replace with field, enter: \U$1
  • Click Replace All to update all instances.

Alternative method (if you prefer):

You can also use this pair if the first one feels unfamiliar:

  • Find what: (:)([a-z])
  • Replace with: $1\U$2

How this works:

  • :\K tells Notepad++ to match the colon but exclude it from the replacement (so we don't retype the colon).
  • ([a-z]) captures the first lowercase letter immediately after the colon.
  • \U$1 converts that captured letter to uppercase.

内容的提问来源于stack exchange,提问作者Maestro Bm

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 09:06:14