replace quote

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
gcotterl
Posts: 252
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

replace quote

Post by gcotterl »

How can I replace a quote-character (") followed by a space at the right-end of a row with a quote-character (")?
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Find what: "_$ [Replace the underscore with a space]
Replace with: "

[X] Regular expression
gcotterl
Posts: 252
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Post by gcotterl »

Cannot match regular expression:
“ $
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Your text contains a " ((ASCII) quotation mark: U+0022) but your search pattern contains a “ (left double quotation mark: U+201C).
gcotterl
Posts: 252
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Post by gcotterl »

"The Fast and the Furious "
"The Love Bug "
"Cheech & Chong’s Up in Smoke "
"Training Day "
"The Evil Dead "
"Dumb and Dumber "
"2 Fast 2 Furious "
"American Graffiti "
"Bad Boys II "
"National Lampoon’s Animal House "
"National Lampoon’s Vacation "
"Thelma & Louise "
"Minority Report "
"Corvette Summer "
"48 Hrs "
"Robocop "
"Cobra "
"Mad Max "
"The Car "
"Grease "
"Sahara "
"Aliens "
"Twins "
"Bullitt "
"Phantasm "
"Bad Boys "
"Joe Dirt "
"Rain Man "
"Iron Man "
"THX-1138 "
"Starsky & Hutch "
"Gone in 60 Seconds (1973) "
"Gone in 60 Seconds (2000) "
"The Gumball Rally "
"Batman, Batman Returns "
"The Mexican "
"Tango & Cash "
"Death Race 2000 "
"Speed Racer "
"Christine "
"Batman Begins, The Dark Knight "
"Goldfinger "
"Fast Times at Ridgemont High "
"The Muppet Movie "
"Better Off Dead "
"Vanishing Point, Death Proof "
"Romancing the Stone "
"Good Burger "
"White Lightning "
"Chitty Chitty Bang Bang "
"The Italian Job (1969) "
"The Italian Job (2003) "
"Pink Cadillac "
"The Cat in the Hat "
"Little Miss Sunshine "
"Indiana Jones and the Last Crusade "
"Kill Bill Vol. 1 "
"The Big Lebowski "
"Mystery Men "
"Transformers "
"Bruce Almighty "
"My Cousin Vinny "
"Smokey and the Bandit "
"The Bourne Identity "
"The Absent-Minded Professor "
"The Adventures of Buckaroo Banzai "
"Raiders of the Lost Ark "
"Thunderbolt and Lightfoot "
"Black Moon Rising "
"The Cannonball Run "
"Scooby-Doo "
"Death Proof "
"Maximum Overdrive "
"Austin Powers: International Man of Mystery "
"Inspector Gadget "
"The Beverly Hillbillies "
"Dirty Mary Crazy Larry "
"The Blues Brothers "
"The Dukes of Hazzard "
"Risky Business "
"The Transporter "
"The Great Race "
"The Karate Kid "
"Transporter 2 "
"Ghostbusters, Ghostbusters 2 "
"The Wraith "
"Back to the Future "
"Tucker: The Man and His Dream "
"Batman: The Movie "
"Days of Thunder "
"Get Shorty "
"The Graduate, Wayne’s World 2 "
"Ferris Bueller’s Day Off "
"The Spy Who Loved Me "
"Wayne’s World "
"Tommy Boy "
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

It's most edifying to know the films you watch, but why did you post that?
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Do you want to remove the space before the second quote character in each line? That's not what you asked for.
gcotterl
Posts: 252
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Post by gcotterl »

Yes
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

So you want to replace a quote-character (") preceded by a space at the right-end of a row with a quote-character (").

Try this:
Find what: _"$ [Replace the underscore with a space]
Replace with: "
User avatar
AmigoJack
Posts: 596
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Re: replace quote

Post by AmigoJack »

gcotterl wrote:a quote-character (") followed by a space
So you actually meant "a quote character (") following a space".

Given your list of examples you would not even had to use regular expressions - just search for a unique string (two characters in your case: a space, followed by a quotation mark) and replace it with whatever you want (one quotation mark, in your case). Easy as that, as there is not one occurance where this would lead to a wrong replacement.
Post Reply