Notepad++removes content from each line starting with "#" up to the beginning of the line (including the "#" itself)
founder
2025-08-05 11:11:33
0order

existNotepad++Delete each line in the middle#The content from the beginning to the beginning of the line (including#By itself, regular expressions can be used:


✅ Operation steps:

  1. Open Notepad++

  2. pressCtrl + HOpen the 'Find and Replace' window

  3. Set the following content:

  • Find what

    ^.*# 
    

    Or (if there may be no space after the '#'):

    ^.*#
    
  • Replace with

    (Leave blank)
  1. Check:

    • ✅“Regular expression

    • ❌ Do not check 'Match line breaks'

  2. Click on 'Replace All'


📌 Example before and after effects:

Original text:

This is some content # This part will be deleted Keep part # Delete this part

After replacement:

This section will be deleted

If you only want to delete#Starting from the beginning to the lineend ofPlease tell me the content, I can give you another expression.

relevant content

Hot

Can fish eat leftovers? It is not recommended for fish to eat leftovers for a long time. Occasionally eating a little bit is not a problem, but the following points should be noted: ✅ Prerequisite for eating: no spoilage: leftover food ..
How much can Huiyuan Juice be consumed in a day Although Huiyuan Juice is a well-known juice brand, it is consumed daily due to its high sugar content (even "100% juice" contains natural fructose) ..
Detailed explanation of time difference conversion between Los Angeles and Beijing time .. Los Angeles uses Pacific Time (PST/PDT), while Beijing Time is China Standard Time (CST, UTC+8). Currently ..
Domestic domain name registration can use CF's d In principle, it is not allowed to directly use Cloudflare (CF) DNS for domain name registration (i.e. ICP registration) in China, for the following reasons ..
The correct method for brewing probiotics The brewing method of probiotics should pay attention to temperature, water quality, and timing, otherwise it may affect the activity of probiotics. Here is a scientific and practical brewing guide: ✅ correct. ..
Similar to Deepseek. Bean buns k... In the field of AI big models in China, such as DeepSeek, Doubao, and Kimi intelligent assistants ..
Analyzing sleep problems from the perspective of traditional Chinese medicine: difficulty falling asleep .. From the perspective of traditional Chinese medicine, sleep disorders (including difficulty falling asleep, lack of drowsiness, easy awakening, early awakening, etc.) are closely related to the dysfunction of the human organs and the imbalance of qi, blood, yin and yang ..
Expose the myth of 'Jewish control over America': .. Revealing the myth of 'Jewish control over America': A historical and factual analysis shows that the claim of Jewish control over America is a baseless conspiracy theory ..
The core points of nonviolent communication: four steps to build .. Nonviolent Communication "is written by Marshall Luxembourg
Can AI completely replace search engines The current industry consensus on whether AI can completely replace search engines is that in the short to medium term, AI is unlikely to completely replace search engines ..