Skip to content
Fix Code Error

Notepad++ add to every line

March 13, 2021 by Code Error
Posted By: Anonymous

I’m using Notepad++ and I can’t figure this out :

I have numerous lines all starting with http. I need to add some text in front of it in every line. Also, I need to add different text to the end of each line. Each line ends differently.

What is the fastest way to add text to the start and end of each line?

Solution

Follow these steps:

  1. Press Ctrl+H to bring up the Find/Replace Dialog.
  2. Choose the Regular expression option near the bottom of the dialog.

To add a word, such as test, at the beginning of each line:

  1. Type ^ in the Find what textbox
  2. Type test in the Replace with textbox
  3. Place cursor in the first line of the file to ensure all lines are affected
  4. Click Replace All button

To add a word, such as test, at the end of each line:

  1. Type $ in the Find what textbox
  2. Type test in the Replace with textbox
  3. Place cursor in the first line of the file to ensure all lines are affected
  4. Click Replace All button
Answered By: Anonymous

Related Articles

  • Form field border-radius is not working only on the last…
  • Trouble with boxes appearing/hiding based on selection
  • Generating a drop down list of timezones with PHP
  • polymer paper-dialog within paper-dialog
  • Polymer paper-dialog: how can I know when an injected dialog…
  • What is your most productive shortcut with Vim?
  • Unexpected end of JSON input while parsing
  • Find CRLF in Notepad++
  • How to separate Polymer button and dialog
  • How to show title in hover - css / jquery

Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.

Post navigation

Previous Post:

Set transparent background of an imageview on Android

Next Post:

How to stop EditText from gaining focus at Activity startup in Android

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Get code errors & solutions at akashmittal.com
© 2022 Fix Code Error