Insert quotation marks at beginning and end of line

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
Hypatia
Posts: 2
Joined: Thu May 20, 2010 9:16 pm

Insert quotation marks at beginning and end of line

Post by Hypatia »

Have tried many many combinations; it will recognize ^ at beginning and $ at end, but will not insert the quotation marks at beginning nor end. Tried it separately and together. :(
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Find what: (^|$)
Replace with: "

[X] Regular expression

Replace All
or
Find what: .*
Replace with: "\0"

[X] Regular expression

Replace All
The first of these assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
The first suggestion will put a single quote mark on empty lines; the second will put two. To make it avoid empty lines, use
Find what: .+
Replace with: "\0"

[X] Regular expression

Replace All
Hypatia
Posts: 2
Joined: Thu May 20, 2010 9:16 pm

Post by Hypatia »

Woohoo! Thank you. Setting the Editor to 'POSIX' made all the difference. The suggestions of how to code the Replace were the icing on the cake. :D
Post Reply