Vim regexp example: make a variable out of params Vim is good

Today I wrote a regexp to change params[:page] into page. Here you
are:

:'<,'>s/params\[:\(\p\{-}\)\]/\1/g

Let’s explain it briefly:

the first part, :'<,'>s/, is the vim command to substitute a pattern
(or a regexp) with another one. The <,'> part tells vim to operate
on the visually selected text.

the second part is the trickiest one. Let’s see it part to part:

params\[: is the first part of the string we want to match. the \
is used to escape the [ character.

\(\p\{-}\) is the content between params[: and ]. It consists
of a sequence of printable characters (\p). The \( and \)
characters around the sequence make it accessible to commands like
substitute. I used the \{-} quantifier instead of the \+ because it
is the non-greedy version; so, for example, if I had