0

I have a set of data - 25 characters long per line by a couple of hundred lines.

Each line / set of 25 characters per line consists of Numbers and Letters (both upper and lowercase)

I want to replace every 11th character (either number or letter) on each line with the character # so instead of

C8P6QagpFPJc4UMtkMAGxz9

I will have

C8P6QagpFP#c4UMtkMAGxz9

Can this be done in Notepad ++

Any assistance welcome.

Thanks,

Robert

2

2 Answers 2

1

With Regular expression selected in the Search Mode, you can do:

Find what:

(^.{10}).(.*)

Replace with:

\1#\2

And press Replace All.

enter image description here

0

Find what : ^(.{10}).(.*)
Replace with : \1#\2

If you only wish to handle 25-long lines (your data has 23), use : ^(.{10}).(.{14})$

enter image description here

3
  • Except for a better screenshot (ie it matches the text), this is literally the same answer as the first one.
    – Berend
    Commented Jul 3, 2023 at 16:57
  • To be fair I had it in the answer as well as {0,10} which isn't needed and can be {10}, but then edited it Commented Jul 3, 2023 at 17:03
  • @Berend: The answers were not identical when posted initially, and are different now. Both answers are now modified from their initial version.
    – harrymc
    Commented Jul 3, 2023 at 17:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .