Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Notepad++ using find-replace function without reg. expressions??

29 Sep 2011   #1
nanquan491

Windows 7 Ultimate x64 (SP1)
 
 
Notepad++ using find-replace function without reg. expressions??

I'm hoping to get lucky with this post since the forums on the official Notepad++ website are very slow to respond, and maybe someone on here uses NPP and knows the answer.

Say I want to find a certain block of code that spans across multiple lines, and replace it with another block of code which spans across multiple lines as well.

From what I understand, this is possible, but you have to use regular expressions, which means taking both blocks of code, and manually editing them to replace all the line breaks with regular expressions, so that they could fit into the single line input of the find-replace function.

Needless to say this is very tedious and time consuming!!

Is there any way that I can just select and copy-paste a block of code spanning across multiple lines, then replace it with another one which I copy-pasted as well, without having to manually edit them to replace line breaks with regular expressions??

This was possible in CuteHTML which I was using before making the switch to Notepad++. I'm not sorry that I did as Notepad++ is far superior, but that is the only feature from CuteHTML that I miss, the ease with which you could find-replace large blocks of code just by copy pasting them.

Any help will be greatly appreciated!

Thanks for reading!


My System SpecsSystem Spec
.
29 Sep 2011   #2
FliGi7

XP / Win7 x64 Pro
 
 

Seems pretty straight forward to me. Use "extended" mode for searching, copy the line in that you want replaced, replace the line breaks with "\r\n", then put the text in you want it replaced with and do the same.
My System SpecsSystem Spec
29 Sep 2011   #3
nanquan491

Windows 7 Ultimate x64 (SP1)
 
 

Quote   Quote: Originally Posted by FliGi7 View Post
Seems pretty straight forward to me. Use "extended" mode for searching, copy the line in that you want replaced, replace the line breaks with "\r\n", then put the text in you want it replaced with and do the same.
Dude, this is exactly what I want to avoid doing... haven't you read my message?
My System SpecsSystem Spec
.

29 Sep 2011   #4
FliGi7

XP / Win7 x64 Pro
 
 

If you could do it the way you want to, you would be able to. And as you've found out, you cannot. I don't get how adding "\r\n" to a line of text is tedious and time consuming when it will do exactly what you need done. Clearly time consumption isn't an issue as you're spending all this time of various forums trying to find a way around something you could instead just be doing and already getting done. Good luck.
My System SpecsSystem Spec
29 Sep 2011   #5
nanquan491

Windows 7 Ultimate x64 (SP1)
 
 

Quote   Quote: Originally Posted by FliGi7 View Post
If you could do it the way you want to, you would be able to. And as you've found out, you cannot. I don't get how adding "\r\n" to a line of text is tedious and time consuming when it will do exactly what you need done. Clearly time consumption isn't an issue as you're spending all this time of various forums trying to find a way around something you could instead just be doing and already getting done. Good luck.
You don't understand how simply copying-pasting a block of code without having to manually replace all the line breaks and adding reg. expressions is easier and less time consuming?

As for time not being an issue because I'm spending it on various forums trying to see if there's a solution to my problem, I'm actually faced with this problem a lot and so if I get a solution for it once and for all it'll save me a lot of time and effort in the future, so I figured I'd try.

Anyway I've never understood people like you who instead of answering the question, are stating the obvious, and then trying to convince someone they were "wrong" to ask the question in the first place.

Thanks for your opinion, but I'm looking for an answer to my question, not for people telling me I shouldn't have a problem with the thing I'm having a problem with in the first place.
My System SpecsSystem Spec
29 Sep 2011   #6
FliGi7

XP / Win7 x64 Pro
 
 

I answered your question in my first two sentences. You can't do it the way you want to. You've already realized this. And, to follow up, I even told you exactly how you could achieve what you wanted to do. So, I'm not sure what else you're looking for. You not wanting to do something doesn't invalid the answer to a question. If you're looking to keep asking a question until you find an answer you want rather than the actual answer, this may not be the forum for you.
My System SpecsSystem Spec
29 Sep 2011   #7
nanquan491

Windows 7 Ultimate x64 (SP1)
 
 

Quote   Quote: Originally Posted by FliGi7 View Post
I answered your question in my first two sentences. You can't do it the way you want to. You've already realized this. And, to follow up, I even told you exactly how you could achieve what you wanted to do. So, I'm not sure what else you're looking for. You not wanting to do something doesn't invalid the answer to a question. If you're looking to keep asking a question until you find an answer you want rather than the actual answer, this may not be the forum for you.
Actually Notepad++ is a pretty extensive program, many features of which I am not familiar with and don't know anything about. That's why I thought I'd ask hoping that people who are more knowledgeable than me would be able to tell me if there's an option to do what I want that I am not aware of.

You answered by saying "If you could do it the way you want to, you would be able to.", which is a hypothetical and inconclusive statement. Rather if you'd known 100% that this wasn't possible I would expect you to write something along the lines of "There is no way to do this in Notepad++, I am an expert on the program and I can say this with 100% certainty!".

Instead you chose to be a smartass about it, by saying it that way, and then proceeding to lecture me that I shouldn't have a problem with the issue I'm having a problem with in the first place. And now you're trying to be a smartass again by basically telling me "I told you so".

Your attitude is that of a very condescending and irritating individual. I don't know if this is on purpose due to some real life frustrations you have, or you don't even realize you're doing this (e.g. Asperger syndrome), and this whole message of mine will now come as a complete shock to you. In any case it's surprising to me how someone with your attitude is actually a "senior member" here on the forums.

Thanks for the great help and your "wonderful" attitude.
My System SpecsSystem Spec
29 Sep 2011   #8
FliGi7

XP / Win7 x64 Pro
 
 

None of my answers were hypothetical, so I'm not sure you understand what that means. I'm not an expert in Notepad++ and you don't need to be to provide an answer to your question. You have an obvious problem you need to solve and Notepadd++, because it's an excellent editor, provides the means to do it. Now, for whatever reasons, you're so vehemently opposed to the answer it provides that you're instead trying to spend time attacking the person who is providing you the answer to this several times. If you want to get into psych evaluations of people, you need to understand what psychological projection is before you start accusing others of what you think they are doing. But, this is SevenForums, not PsychForums. You've been provided the answer twice now and it's obvious you have a problem with its reality. I apologize if somehow me answering your questions has offended you, and I don't want to turn you off to this great forum. But, based on your attitude thus far, it sounds like you're looking for a place someone might tell you what you want to hear rather than provide you with an answer.
My System SpecsSystem Spec
29 Sep 2011   #9
nanquan491

Windows 7 Ultimate x64 (SP1)
 
 

Quote   Quote: Originally Posted by FliGi7 View Post
None of my answers were hypothetical, so I'm not sure you understand what that means. I'm not an expert in Notepad++ and you don't need to be to provide an answer to your question. You have an obvious problem you need to solve and Notepadd++, because it's an excellent editor, provides the means to do it. Now, for whatever reasons, you're so vehemently opposed to the answer it provides that you're instead trying to spend time attacking the person who is providing you the answer to this several times. If you want to get into psych evaluations of people, you need to understand what psychological projection is before you start accusing others of what you think they are doing. But, this is SevenForums, not PsychForums. You've been provided the answer twice now and it's obvious you have a problem with its reality. I would suggest you find another place where someone might tell you what you want to hear rather than provide you with an answer.
You provided no answer to my dilemma what so ever. If admittedly you're not an expert on Notepad++, then there might be a way to do what I want which you just don't know about, simple as that.

You telling me with a condescending attitude what I already know and then proceeding to lecture me that I shouldn't have a problem with it is not helpful in the slightest.

You seem to be completely lacking a sense of self awareness.

Anyway this is getting quite ridiculous. I didn't come to this forum to start a flame war with people who have personality problems. I came here to get help with my issue.

Is there anyone here who IS an expert on Notepad++ that can confirm with absolute certainty that what I'm looking to achieve is impossible?

Thanks!
My System SpecsSystem Spec
29 Sep 2011   #10
FliGi7

XP / Win7 x64 Pro
 
 

Quote   Quote: Originally Posted by nanquan491 View Post
You provided no answer to my dilemma what so ever.
From your original post:

Quote   Quote: Originally Posted by nanquan491
Is there any way that I can just select and copy-paste a block of code spanning across multiple lines, then replace it with another one which I copy-pasted as well, without having to manually edit them to replace line breaks with regular expressions??
My second reply:

Quote   Quote: Originally Posted by FliGi7
If you could do it the way you want to, you would be able to. And as you've found out, you cannot.
My third reply:

Quote   Quote: Originally Posted by FliGi7
You can't do it the way you want to.
Believe it or not (which seems to be the case), those are answers to your question. Another answer is to use regular expressions, as stated in my first post, which have been specifically created for these sorts of situations. Yet another answer is to go back to your CuteHTML editor that you know already does this. So you not only have two direct answers to your question on whether or not you can do what you're looking to do in Notepad++, but you also have two possible solutions to achieve your copy/replace problem.

You're confusing the difference between an answer, of which 2 have been provided, and a solution to your liking. No one can blame you for looking for a solution to your liking, but to say no answers have been provided is simply not reality.

Maybe someone else can come up with another solution that you may find suitable, but I obviously cannot. I hope you get it sorted out.
My System SpecsSystem Spec
Reply

 Notepad++ using find-replace function without reg. expressions??




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How can I replace function of shutdown button with hibernate?
Hi I want my PC to hibernate when I press shutdown ( exactly shutdown button ) but I don't know how can I modify something like registry or group policy... to achieve my goal. Is there any way to do that ? Thanks in advance
Performance & Maintenance
How to find a notepad file with a specific word in it
Hello SevenForums! Right now on my computer, i have a lot of notepad files. In one of those files, it contains a specific word along with some other words. I need to find that notepad file, so how would i search for notepad files containing XXXXXXX? I tried in the top right searchbar, no luck.
General Discussion
Word Document find and replace, find duplicates
I have a document that is hundreds of pages long. Within this document there are certain sentences, phrases that repeat and I need to find them in a practical manner. Now I could go through manually, look for lines I suspect are repeated elsewhere and search for them, but that would take...
Microsoft Office
Find and Replace
Excel 2007 - I would like to do a Find and Replace a word and when I do it changes the entire cell by taking the words which have color and truning them black and changing my fonts to one size. How can I just Find and Replace just one word in a cell? Is there anyway I can do a find and have all the...
Microsoft Office
Good or bad to replace Notepad in windows 7?
As a LONG time XP user I replaced Notepad with Notepad++ and was VERY pleased with the result as IMO Notepad should be more like Notepad++ in the first place. My question is first should I try to Replace it as i did with Windows XP? Secondly If this is an ok thing to do (will not harm anything)....
General Discussion
Dreamweaver CS4 Find and Replace question
Is there any way to search and replace a term in an entire directory? For example, I am working on getting my organization's new website ready to go live and there are tons of text changes that I need to propogate across the site. I am in the root directory (standupnew), and it has about 80...
Software


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 16:20.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App