1

I have hundreds of text files under a directory that contain (correctly) some tokens surrounded with << >> like:

Hello, my name is <<myName>> and I am the manager of the <<teamName>> team.

But in some files, some of the tokens are "incorrectly" between < > like:

Hi, this is <myName> from the <<teamName>> team.

How can I use the "Find in Files" feature in Notepad++ to find such < > tokens and replace them with the correct << >> ones?

1
  • 2
    Have you asked an AI before asking here? it's pretty basic
    – vsync
    Commented Oct 14, 2024 at 14:31

1 Answer 1

4

You can use replace with regex, your regex can be:

(?<!<)<([a-zA-Z0-9_]+)>(?!>)

and replace with can be:

<<\1>>

Like this:

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.