Notepad++ snippets

How to fint the X th character in Notepad++

Let say you have the following text:

Notepad++ replace 1

SLorem ipsum dolor sit amet, consectetur adipiscing elit. Proin eget lorem quis nunc tincidunt varius. Maecenas non metus nulla. Mauris suscipit nec ante sit amet dapibus. Nulla facilisi. Maecenas eget faucibus nulla. Etiam iaculis arcu eget nulla convallis, et suscipit quam gravida. 
                            Sed leo magna, accumsan ac lacus non, sollicitudin tempus arcu. Praesent ut sem sit amet nisl bibendum molestie. Pellentesque mi nisi, imperdiet sit amet efficitur a, commodo in magna. Donec commodo ipsum et finibus aliquam. Cras eu massa lectus. Morbi nec ultricies elit, a pulvinar sem. Etiam sit amet sodales lorem.

and you want to find the 130th character:

Notepad++ replace 3

To do this in Notepad++, you can just hit CTRL + H for Replace window and the select the following:

Notepad++ replace 2

  • Find what: (?<=^.{130})."
  • Flag Regular expression
  • Do not flag . matches new lines

Back to Notepad++ cookbook page