NotePad++ replace problem

后端 未结 3 1101
野趣味
野趣味 2021-02-19 06:33

I have a file with lots of text editing using NotePad++.

for example

some textanother

相关标签:
3条回答
  • 2021-02-19 07:11

    example from notepad : trying to replace this text: 0x0145 test with this text: [0x0145] test

    enter image description here

    0 讨论(0)
  • 2021-02-19 07:26

    Use a regex like: <span class="italic">([\w\s\d]+)</span>

    and replacement like: <i>$1</i>

    The important point here is to create a matching group for your text by surrounding it in brackets i.e. ([\w\s\d]+) which matches one or more:

    • \w word chars
    • \s space chars
    • \d numeric chars

    Now in your replacement string, reference the first and only matched group with $1.

    0 讨论(0)
  • 2021-02-19 07:34

    <span class="italic">([^<]+)</span> => <i>\1</i>

    <span class="bold">([^<]+)</span> => <b>\1</b>

    [^<]+ matches one or more of any character except <, and the parentheses capture it in group #1. \1 inserts the captured text into the replacement string.

    0 讨论(0)
提交回复
热议问题