Discussion:
Add text to end of each line?
(too old to reply)
Matt_M_
2006-10-02 05:54:34 UTC
Permalink
Hi,

I am using Dreamweaver MX 2004 version 7.0.1 and would like to add the same
text to the end of every single line in my .txt file. Is there a way to get
Dreamweaver to do this for me? If not, can someone please recommend a program
that will do this?

Thanks, Matt
John Waller
2006-10-02 06:51:22 UTC
Permalink
Post by Matt_M_
I am using Dreamweaver MX 2004 version 7.0.1 and would like to add the same
text to the end of every single line in my .txt file.
Can you offer any more detail?

What .txt file are you referring to?
--
Regards

John Waller
Matt_M_
2006-10-02 07:26:59 UTC
Permalink
Any txt file. Let say it looks like this:

line 1
line 2
line 3

and I want it to look like this

line 1 blah blah
line 2 blah blah
line 3 blah blah
Murray *ACE*
2006-10-02 11:18:04 UTC
Permalink
I use Microsoft Word to do such things.
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
Post by Matt_M_
line 1
line 2
line 3
and I want it to look like this
line 1 blah blah
line 2 blah blah
line 3 blah blah
Gary White
2006-10-02 13:43:53 UTC
Permalink
On Mon, 2 Oct 2006 07:26:59 +0000 (UTC), "Matt_M_"
Post by Matt_M_
line 1
line 2
line 3
and I want it to look like this
line 1 blah blah
line 2 blah blah
line 3 blah blah
Press Ctrl+F to open the find & replace dialog.
Click the Use regular expression box.
Find: \n
Replace with: blah blah\n
Replace all.

Gary
Mister Mustard
2006-10-02 15:10:24 UTC
Permalink
Post by Gary White
On Mon, 2 Oct 2006 07:26:59 +0000 (UTC), "Matt_M_"
Post by Matt_M_
line 1
line 2
line 3
and I want it to look like this
line 1 blah blah
line 2 blah blah
line 3 blah blah
Press Ctrl+F to open the find & replace dialog.
Click the Use regular expression box.
Find: \n
Replace with: blah blah\n
Replace all.
Gary
How nice to know, thank you!
Gary White
2006-10-03 14:47:46 UTC
Permalink
Post by Mister Mustard
How nice to know, thank you!
You're welcome. One additional note is that the Use regular expression
box is sticky. The next time you use F&R, it will remain checked. You
need to remember to uncheck it to do a normal F&R.

Gary
Mister Mustard
2006-10-02 13:54:43 UTC
Permalink
On Mon, 2 Oct 2006 05:54:34 +0000 (UTC), "Matt_M_"
Post by Matt_M_
Hi,
I am using Dreamweaver MX 2004 version 7.0.1 and would like to add the same
text to the end of every single line in my .txt file. Is there a way to get
Dreamweaver to do this for me? If not, can someone please recommend a program
that will do this?
Thanks, Matt
How many lines are in your file?
Matt_M_
2006-10-02 19:27:36 UTC
Permalink
Excellent! Also, is there a way to add text to the beginning of each line?

Thanks, Matt
Matt_M_
2006-10-03 06:01:57 UTC
Permalink
Anyone?
Bonnie
2006-10-03 14:03:44 UTC
Permalink
Post by Matt_M_
Anyone?
The trick is to characterize the beginning of each line in some way that
lets you search on it. You could use regular expressions to look for, say:

[period] followed by [space] followed by [any upper case letter]
or it might be
[hard return] followed by [any alpha character]

I don't know the specific regex for that but many here do and it would
be easy enough to look it up on Dogpile or Google.
--
Bonnie
in California
8 ^ )
Gary White
2006-10-03 14:48:32 UTC
Permalink
On Tue, 3 Oct 2006 06:01:57 +0000 (UTC), "Matt_M_"
Post by Matt_M_
Anyone?
Press Ctrl+F to open the find & replace dialog.
Click the Use regular expression box.
Find: \n
Replace with: blah blah\nbeginning of next line
Replace all.

Gary

Continue reading on narkive:
Loading...