How can I find / replace part of wildcard search in Notepad ++

A simple example.
When I edit CSS. I want to find all the "backgrounds" regardless of the sequence of numbers, so I use.*

~~~ Example:
Find background: #.*;

(4 Matches Found)

Line12: background: # 111111;

Line24: background: # 222222;

Line36: background: # 333333;

Line48: background: # 444444;

"Found (#) strings matching"
Great, works great!

(The next part is where I am having problems)

Now I want to replace, or in this case, wrap all of these lines with / * * / without deleting individual numbers.
(To remove certain backgrounds when I finished editing the page.)

~~~ Example:
Replace with /* background: #.*; */

:

Line12:/* background: # 111111; */

Line24:/* background: # 222222; */

36:/* : # 333333; */

48:/* : # 444444; */

:

Line12:/* background: #. *; */

Line24:/* background: #. *; */

Line36:/* background: #. *; */

Line48:/* background: #. *; */

, ( ) /* */

+4
2

- , (, ).

(background:.*?;)

:

/* \1 */

, , regex . () , \1.

+3

: background: #([0-9]+);

: /* background: #\1 */

([0-9] +) \1. \1 "".

+4

Source: https://habr.com/ru/post/1541682/


All Articles