Check if the REGEX work here or here.
Upright sub and super
\newcommand\upsubsup[1]{\textnormal{#1}}
Change to subs to capital letters
([\^_])\{([\\|a-z|A-Z]{4,})\}
([\^_])\{([A-Z])\}
\1{\upsubsup{\2}}
Replace in Texstudion
Use '#1' and '#2'
Replace citep
\\citep\[see, e.g.,\]\[\]\{(.*?)\}
(see, e.g., \citep{$1})
\\citep\[e.g.,\]\[\]\{(.*?)\}
(e.g., \citep{$1})
Match comment block
\\begin\{comment\}[\n\r\S\s]+?\\end\{comment\}
Match inline comment (skip TODOs)
^\s*%(?!\s*TODO|\s*todo).*\n
Inline comments 2
\s+(?!\\%)%.*
Remove blank lines
^\n(\s)*$
Match \textit{\sqone{}}, \textit{\sqtwo{}}, \textit{\sqthree{}}
\\textit\{(\\\b(sqone|sqtwo|sqthree)\b\{\})\}
Replace multcolumn headers
\\multicolumn\{1\}\{c\}\{\\ra\{1\}\s*\\begin\{tabular\}\[c\]\{@\{\}c@\{\}\}(.*?)\\end\{tabular\}\}
\tableh{1}{@{}c}{\1}
Replace multirow headers
\\multirow\{1\}\{\*\}\{\\ra\{1\}\\begin\{tabular\}\[c\]\{@\{\}c@\{\}\}\\addlinespace\[\\paddingupfour\]\s*(.*?)\s*\\end\{tabular\}\}
\tablehmrow{1}{\1}
Spaces in tables
([\n\s]*)&([\s\n]*)
[\n\s]+(?!\\&)&[\n\s]+
Remove dois
[\n\s]*doi[\s]*=[\s]*\{.*\},?|,?[\n\s]*doi[\s]*=[\s]*\{.*\}
\\href\{.*?\}
([\n\s]*url.*doi.*,)|(,[\n\s]*url.*doi.*\})
Remove unwanted categories
^(\s*\b(?!number|pages|title|volume|year|number|journal|author|title|booktitle|publisher|url)\b(.+)\s*=\s*\{.*\}[,\r\n]*)
Remove white lines
^\s*\
Format .tex using latexindent
"folder_latexindent/latexindent.exe" "folder_latex_files/main.tex" >> "folder_latex_files/main_formatted.tex"
Invert sub, super
\^(\{[\\\w\{\}]*\}|\w*)\_(k|{k})