I want to adding character to the first of lines with 60 or more characters, how can I do this?
I used this (.{60})\s to search, but I don't know what to put in replace
I want to adding character to the first of lines with 60 or more characters, how can I do this?
I used this (.{60})\s to search, but I don't know what to put in replace
You may want to use a capturing group starting at begin of a line. You'd go through following steps:
(^.{60})added text\1is resulting in:
The replacement addedtext\1 is beginning with some text and adds the text stored by the capturing group.
Some additional information about reinserting text matched by capturing groups in the replacement text:
The
\1syntax for backreferences in the replacement text is borrowed from the syntax for backreferences in the regular expression.\1through\9are supported by the JGsoft applications, Delphi, Perl (though deprecated), Python, Ruby, PHP, R, Boost, and Tcl.
$1through$99for single-digit and double-digit backreferences are supported by the JGsoft applications, Delphi, .NET, Java, JavaScript, VBScript, PCRE2, PHP, Boost, std::regex, and XPath.
Quoted from: Numbered Backreferences
Notepad++ regular expressions use the Boost regular expression library v1.80 (as of NPP v8.4.7), which is based on PCRE (Perl Compatible Regular Expression) syntax.