I need to replace something like this:
with something like this:
I have tried some random stuff I've found, but no luck. What would the code be with regexp?
To match the last 40 characters of a line you would use the regex:
This means: "Match any character 40 times followed by end of line".
If you're interested in replacing the entire line you would use the regex
and a Replacement text of
would change your example text to
The brackets create a capture group and notepad++ replaces \n with the nth capture group.
Alternatevly, for your particular example (depends on what the other lines look like) you could use a pattern of
Which simply matches all lines starting with "userPassword:".