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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like