How can I find and delete a certain regular expression in the Geany text editor?
1
vote
1
answer
3604
views
I have a sample text like this:
\documentclass[a4paper]{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{color}
\setlength{\parindent}{0em}
\setlength{\parskip}{2ex plus1ex minus0.5ex}
\newcommand{\stylea}{\noindent{\textcolor[rgb]{0.9, 0.9, 0.8}{\fcolorbox[rgb]{0, 0, 0}{0.2, 0.2, 0.2}{#1}}}}
\begin{document}
\ttfamily
\setlength{\fboxrule}{0pt}
\setlength{\fboxsep}{0pt}
1 \stylea{\# Author{\hspace*{1em}}: Bhishan Poudel} \\
2 \stylea{\# Date{\hspace*{1em}}{\hspace*{1em}}: May 19, 2016} \\
3 \stylea{} \\
4 \stylea{Line wrapping in geany} \\
5 \stylea{===============================================================================} \\
6 \stylea{edit > preference > editor > features > line wrapping} \\
7 \stylea{then,} \\
8 \stylea{document > line wrapping} \\
\end{document}
I want to delete all the words \stylea{ }, keeping the words inside {} intact.
I know I can find and replace \stylea{ and replace by whitespace,
but I don't even want whitespace and also want to delete the closing brace, }, at the same time.
Also can we replace words in only the selected block in Geany?
For example, if I select the lines 1 to 8, and replace stylea by styleb?
Asked by BhishanPoudel
(113 rep)
May 19, 2016, 04:32 PM
Last activity: May 22, 2020, 11:14 AM
Last activity: May 22, 2020, 11:14 AM