I was trying to re-structure my latex document but I failed to do it in a single query regex. My goal was to the following transformation:
\item[root] → \item \textbf{root}
I tied grouping the content withing the brackets and then using in the replacement but it did not work.
This was my attempt:
Alt-S-% \\[\(.*\)] RET \\textbf{\1} RET
I tried playing with the regexp-builder but it seems to have a slightly different syntax than then replace-regexp command.