0

I'm using notepad++.
I would like to find inside id selector

<div id="BA5Ut" class="post"></div>
<div id="k2lwuCi" class="post"></div>
<div id="4Ikfwvh" class="post"></div>
<div id="NsR8yLS" class="post"></div>

and i want to replace every random id with uniform id

<div id="upload" class="post"></div>
<div id="upload" class="post"></div>
<div id="upload" class="post"></div>
<div id="upload" class="post"></div>

How can I do a replacement?
So can anyone help me with regex?

2 Answers2

3

Find

id="[^"]*"

Replace with

id="upload"
rzymek
  • 9,064
  • 2
  • 45
  • 59
1

If the task is as simple as you describe it, you could use something like this:

id="[^"]+"

Replace with:

id="upload"

[^"]+ will match anything but a double quote character.

Jerry
  • 70,495
  • 13
  • 100
  • 144