Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I delete all sentences containing English in Notepad++?

I tried this with words by using find/replace (find [A-Z] [a-z] and replacing with blanks), but even with this i stuck with all the remaining blanks and punctuation symbols.

It would also be great if I could not only delete English, but knew how to choose all sentences in a specific language.

share|improve this question
5  
Can you explain why you want to do that? What is your use-case, and why do you need Notepad++ for this? What are the other languages involved? – slhck Mar 11 '12 at 0:24
    
if you had a script which tagged sentences based on language like <french>......</french> it could use some algorithm to do that. I doubt NPP would. You could easily delete with notepad++ after that. You could ask on stackoverflow about the algorithm and programming language. But I don't know why you say about punctuation, if for some reason your A-Z was nearly there, then if you want you could do [-A-Za-z,_.] see regular-expressions.info/charclass.html "Metacharacters Inside Character Classes" – barlop Mar 11 '12 at 5:01

Okay, I've worked out the following regular expression;

[('``"]?[A-Za-z]+[-!,.'``" ;?)]?

This contains three capture sets, the first and last sets of punctuation characters, adjust these as you see fit.

My example text;

Dear blah,

Your message is full of blah, but blah no more.  Sorry, I hope Charlie's message gets 
through but as he quotes `don't let the postman talk blah`. The postman often
knocks on the door, and as he does so, he shouts "blah!" - continuing my thought.  
Now for a list(is it really a list?) of blah; blah, blah, blah.

Code; 345345-34545-345435435-34543543
Yours sincerely,


Boris

Resulting text;

345345-34545-345435435-34543543
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .