I am using Notepad++ and want to insert a character at a specific position in a string using regular expression replacement.
What would the expressions be to, say, insert a comma at position 6 of every row?
If you want to add a character after the sixth character, simple use the search
^(.{6})
and the replacement
$1,
(Example inserts a ,
)
technically spoken this will replace the first 6 characters of every line with MatchGroup 1 (backreference $1
) followed by a comma.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With