Page 1 of 1
replace quote
Posted: Tue Aug 28, 2018 2:16 am
by gcotterl
How can I replace a quote-character (") followed by a space at the right-end of a row with a quote-character (")?
Posted: Tue Aug 28, 2018 7:52 am
by ben_josephs
Find what: "_$ [Replace the underscore with a space]
Replace with: "
[X] Regular expression
Posted: Tue Aug 28, 2018 5:18 pm
by gcotterl
Cannot match regular expression:
“ $
Posted: Tue Aug 28, 2018 7:30 pm
by ben_josephs
Your text contains a " ((ASCII) quotation mark: U+0022) but your search pattern contains a “ (left double quotation mark: U+201C).
Posted: Tue Aug 28, 2018 7:45 pm
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 "
Posted: Tue Aug 28, 2018 7:52 pm
by ben_josephs
It's most edifying to know the films you watch, but why did you post that?
Posted: Tue Aug 28, 2018 7:59 pm
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.
Posted: Tue Aug 28, 2018 8:03 pm
by gcotterl
Yes
Posted: Tue Aug 28, 2018 8:48 pm
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: "
Re: replace quote
Posted: Wed Aug 29, 2018 5:50 am
by AmigoJack
gcotterl wrote:a quote-character (") followed by a space
So you actually meant "a quote character (") follow
ing 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.