Notepad++ Find and Replace a Constant String

Notepad++ Find and Replace a Constant String

Using notepad++ I have the following text.

This little piggy went to market, \cite{smith1774}
This little \cite{ben1864} piggy stayed \cite{mueller2867} home,
This little piggy had roast beef

I want to find and remove all the \cite{..} so i am only left with the nursery rhyme

1 Answer

Search Menu, Replace

Search Mode: Regular Expression

Find: \\cite\{[^{]*\}
Replace: (nothing)

Match:

\\    - literal backslash
cite  - the word cite
\{    - literal {
[^{]* - any number of any character other than {
\}    - literal }
4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.