Notepad++ find and replace within a constant string

Solution 1:

You can do it following these steps:

  • open find and replace dialog (CTRL+H)
  • make sure "regular expression" box is checked
  • find what:
    \\textbf\{([^}]*)\}
  • replace to:
    $1

You can test is here

Solution 2:

An alternative approach is to use a non-greedy wildcard (.*?) in the capturing group.

Search for:

\\textbf\{(.*?)\}

Replace with:

\1