Select Categories Below
Advertisement
Start Your Own Q&A Site
Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.
Status: Closed Points: 125 Time: 14:20 - Sep 13, 2006
mary2
I have a textpad document where I am editing my HTML code. If I need to go through a portion of text and add something like ( pagebody=' ), is there a way to do this without having to just use the paste function and manually go through every line and paste? Also, how do I add similar text to the END of every line also?
Categories:
Add Categories
When adding more than one category, separate them with commas.
rcastagna
Date:: Sep 13, 2006
Time:: 16:11
I'm not familiar with Textpad - I use Notepad ++ for this type of chore - but check to see if TextPad will support doing a Find/Replace using a Regular Expression pattern, or look to a deditcated piece of RegEx software such as Regex Suite. You can create your pattern that will key off of the CR/LF found that the end of each line in the document (assuming, of course, there is a CR/LF at the end of each line) to "wrap" that CR/LF with the new code you want. I'm not a huge RegEx guy but this should work: Find: \r?\n Replace with: DesiredEndofLine\r\nDesiredBeginningofLine I hope this helps...a good site for learning about Regular Expressions is RegularExpressions.Info http://www.regular-expressions.info Take care, Ric
Date:: Sep 15, 2006
Time:: 18:11
Tried that out but it just gave me a an error that said "Cannot find literal string \r?\n". I also tried it with just "\r\n" because I wasnt sure if that question mark was a typo but it had the same response.
Date:: Sep 18, 2006
Time:: 14:31
I found in textpad you can put a ^ to replace all items at the beginning of the line and then $ for the end, but for some reason if there is an ampersand in the text you are trying to insert, it doesnt get inserted. Example. search: $ replace with: " &myCrLf It puts " myCrLf at the end of every line but leaves out the &, any thoughts on this. Fixes?
Time:: 18:21
John, Try: search: $ replace with: " !myCrLf and then go back and try: search: ! replace with: & Or, look to see if you can "escape" a character...it might be treating that & symbol as a special character like it's treating the $ and the ^ I hope this helps, Ric
Date:: Sep 19, 2006
Time:: 04:15
John, Or, you could switch over to Notepad which doesn't treat the & as a special character and do the second pass on the replace. I know...a long way to get to where you want to go, but it may be the only way. Ric
Time:: 10:07
Hey rcastagna, Your response really helped a lot. It was required to do a second pass, just had to make sure that Regular Expressions was checked on the first pass and then unchecked on the second one. I finally did a search: $ replace with: " &myCrLf WITH the regular expressions activated and then went back and did a: search: " myCrLf replace with: " &myCrLf with them not activated. Worked like a charm.
alooka
Date:: Jan 28, 2010
Time:: 18:28
WOW this is almost 4 years old post. Any way, I was looking for the same thing and I got it so let me share it for any future searcher... You can use notpad2 ( an open source code editor) in the edit menu>Block modify lines you can add at the beginning and end
Question Answered
This question has been closed, and points have been rewarded to the following experts:
You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
whats the best food to eat during midnight?
How to identify the tiffany jewelry? www.tffanycheapmall.com.
Send an email alert to each user of the php application based on criteria
How I Increased My AdSense Earnings?
how to choose the lady dress ?
How can I fulfill the minimum requirement to make your computer support 3D?
You have 100 characters to use
Rank
Expert
Points
1.
10354
2.
6493
3.
5596
4.
4848
5.
3487
6.
2840
7.
2770
8.
2303
9.
1820
10.
917
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software