There is a file on a large number of lines. It is necessary at the beginning of each line to add a set of characters, for example, 123 . How to do it? Thank.

  • under the notebook here what notebook is meant? - Grundy

2 answers 2

In Sublime Text, you can select the menu item Find | Replace ... , enable regular expressions mode,. * Icon, enter the regular expression at the beginning of the line in the first text field

 ^ 

And in the second field to replace

 123 
  • one
    Thanks, but how to do the same with the end of the line? - maksvolf
  • one
    To mark the end of a line in regular expressions, the symbol $ - cheops is used
  1. Select the desired lines
  2. Ctrl + Shift + L
  3. Home / End
  4. 123