WinEdtRemoving text via search and replace

Information and discussion about WinEdt, a commercial integrated LaTeX environment for Windows
Post Reply
cbkschroeder
Posts: 55
Joined: Sun Nov 09, 2008 7:48 pm

Removing text via search and replace

Post by cbkschroeder »

Hello,

Off the top, I admit I haven't spent much time working with the advanced search and replace functionality of Winedt 5.4 that I'm using at the moment. Before I invest a great deal of time in it, I was wondering if somebody might have some suggestions as to the following:

Let's say I have:

Code: Select all

\begin{figure}
   \caption{some text}
   \bigskip\bigskip
   \includegraphics{stuff}
\end{figure}
A simple search and replace will allow me to remove the \bigskip\bigskip but leave an empty line in its place. My question is: how do I remove the \bigskip\bigskip and not have the empty line remain?

Any thoughts for what must be a rudimentary question are much appreciated.

Thank you.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Removing text via search and replace

Post by frabjous »

I don’t use WinEDT, or even Windows for that matter, but assuming it's standard regular expressions, you’d search for \s*\\bigskip\\bigskip\n, where '\s*' is the code for any amount of whitespace, '\\' is the code for '\', and '\n' is the code for a linefeed. Replace with \n for a single linefeed.

If it’s not using standard regular expressions, I have no clue.
cbkschroeder
Posts: 55
Joined: Sun Nov 09, 2008 7:48 pm

Re: Removing text via search and replace

Post by cbkschroeder »

I'll give that a spin; thank you.
cbkschroeder
Posts: 55
Joined: Sun Nov 09, 2008 7:48 pm

Re: Removing text via search and replace

Post by cbkschroeder »

Yeah, entering "\n" searches for just that; not a linefeed, unfortunately.
Post Reply