How to find and replace nth character from last in notepad++
-
Below is Original
AI 2015
Adu 2020
Ajji 2017
Akam 2011
Alai 2003I want ot Replace the Space before the Year with TAB like Below,
AI 2015
Adu 2020
Ajji 2017
Akam 2011
Alai 2003So i want to replace the 5th Charrecter from last… Any Help ?
-
Try a regular expression (regex) replacement. For example:
-
On the menu, click Search > Replace.
-
Select the Regular Expression option.
-
In the Find What box, enter:
\s([0-9]{4}\R)
This expression finds a space character, followed by a sub-expression containing four instances of a digit 0-9 and a newline. -
In the Replace With box, enter:
\t($1)
This expression replaces the found string with a tab character, followed by the Find What sub-expression. -
Click the Replace All button.
Vary the regex syntax according to the precise requirements of your file. For a detailed explanation of the syntax, see:
https://npp-user-manual.org/docs/searching/
https://www.boost.org/doc/libs/1_70_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html -
-
Wow…
Worked Perfectly…Thank you Verymuch…
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login