If you want to delete all the text after a character or string (to the right) in Notepad++ you would need to make use of regex.
Let's say I have the text below which has a colon at each line and I do not want any text after the char colon (:)
Text:1 - New York, New York: 8,336,817 8,175,133 8,008,278 7,322,564
2 - Los Angeles, California: 3,979,576 3,792,621 3,694,820 3,485,398
3 - Chicago, Illinois: 2,693,976 2,695,598 2,896,016 2,783,726
4 - Houston, Texas: 2,320,268 2,100,263 1,953,631 1,630,553
5 - Phoenix, Arizona: 1,680,992 1,445,632 1,321,045 983,403
6 - Philadelphia, Pennsylvania: 1,584,064 1,526,006 1,517,550 1,585,577
7 - San Antonio, Texas: 1,547,253 1,327,407 1,144,646 935,933
8 - San Diego, California: 1,423,851 1,307,402 1,223,400 1,110,549
9 - Dallas, Texas: 1,343,573 1,197,816 1,188,580 1,006,877
10 - San Jose, California: 1,021,795 945,942 894,943 782,248
11 - Austin, Texas: 978,908 790,390 656,562 465,622
12 - Jacksonville, Florida: 911,507 821,784 735,617 635,230
Press Ctrl + Shift + F to open Find window, move to Replace Tab, Find :.* and Replace With: (keep it blank), make sure to keep Search Mode as Regular Expression,
Output:1 - New York, New York
2 - Los Angeles, California
3 - Chicago, Illinois
4 - Houston, Texas
5 - Phoenix, Arizona
6 - Philadelphia, Pennsylvania
7 - San Antonio, Texas
8 - San Diego, California
9 - Dallas, Texas
10 - San Jose, California
11 - Austin, Texas
12 - Jacksonville, Florida
Delete all text after a character or string in Notepad++
So, simply add .* to delete all characters after the string or character on each that you want to delete from a line.
Related Questions:- To delete after character: (char).*
- To delete after string?: (your-string).*
- To delete after word? : (your-word).*
- To delete after space? : \s.*
- To delete after comma? : ,.*
- To delete after semi-colon? : ;.*
- To delete after pipe? : \|.*
More Posts related to NotepadPlusPlus,
- Add Custom header and footer to Windows Notepad file
- Enabling Notepad++ Dark Theme
- Notepad++ is about to exit prompt message
- Go to Line Number option in Windows Notepad
- How to Convert CSV file to SQL Script using Notepad++
- How to un-hide tab bar in notepad++
- Notepad++ display files on tab bar as horizontal instead of vertical
- Compare two text files in Notepad++
- Column Mode Editing in Notepad++
- Convert SQL to CSV in Notepad++
- List of Programming Languages Supported by Notepad++
- Keyboard shortcut to close tab in Notepad++
- How to open a new tab in Notepad++
- How to Enable spellcheck Notepad++
- Prettify JSON in Notepad++
- Word count in Notepad++
- How to create MD5 digest in Notepad++
- Notepad++ delete lines above or below
- Unable to edit file in Notepad++
- Word wrap text in Notepad++
- Notepad++ Editor alternatives for Mac OS X
- Launch Notepad++ html document in any web browser
- Convert text to random case using Notepad++
- Show Notepad++ tabs in multiple lines instead of scroll on tab bar
- 97 Useful Notepad++ Keyboard Shortcuts
- Base 64 Encoding Decoding In Notepad++
- Where are Notepad++ temp unsaved files stored?
- How to add Date and Time to Windows Notepad File
- How to Apply Themes to Notepad++
- Multiple line editing in Notepad++
- Add comma or semicolon at end of each line Notepad++
- How to know Notepad++ is 32-bit or 64-bit Version
- Notepad++ do not show CRLF characters
- Notepad++ select all above or below lines
- Change default language highlighting in Notepad++
- How to check about details of Notepad++ text editor
- Setting up Cloud feature with Notepad++
- Add Blank Lines Between Each Lines in Notepad++
- How to zoom-in or zoom-out in Windows Notepad
- Replace tabs by spaces or comma Notepad++
- [Nopepad++] How to add text at end of each line
- Using Document Map in Notepad++
- Notepad++ insert a blank line above or below the current line example
- Portable Notepad++ for windows
- How to format or prettify XML in Notepad++
More Posts:
- This class should be public (android.support.v7.internal.widget.ActionBarView.HomeView) Lint Error - Android
- Eclipse : The type java.lang.CharSequence cannot be resolved. Indirectly referenced from required .class files - Java
- Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later. - Android
- How to repeat tile background image in Android Activity - Android
- How to change Android Button Color using xml attribute and programatically using java - Android
- Maven : java.lang.ClassNotFoundException: Xmx512m - Android
- How to Get or Set SharePoint Document ID _dlc_DocId using PowerShell - SharePoint
- How to find AUTO_INCREMENT fileds value in mysql table - MySQL
- Add Animated Scrolling to Html Page Title Script - JavaScript
- JavaScript : Get url protocol HTTP, HTTPS, FILE or FTP - JavaScript
- Unable to connect to the Internet : Google Chrome - Chrome
- java.io.IOException: Unable to locate resource handler.properties - Java
- Redirect page using jQuery - jQuery
- Android Studio : Build Tools 23.0.0 rc1 is deprecated - Android-Studio
- Eclipse : This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in - Eclipse