View Single Post
Old 01-26-2012, 08:27 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by ElMiko View Post
Not to long ago I asked a question about how do the opposite of this. Natrually now I need to now how to do the opposite of that...

I'm currently working on a document in which all double-quotations marks have been replaced with a question mark. Obviously, I'm trying to undo that. The way i had planned on doing that is by search for strings that begin with ? and end with two consecutive punctuation marks, the latter of which also being ? (i.e., .? or !? or ,? or ??).
The search I was using was:
Code:
\?([^\.]*)\.\?
I was then going to do subsequent searches with different punctuation marks in between the brackets. Unfortunately, I never got that far because the above search was being too greedy.

example:
Code:
  <p>?Or the television reports??</p>

  <p>?No.?</p>
for the above text, the search matches "??</p> <p>?No.?" instead of just "?No.?"

How do I do this right? (PS - using "<" as a marker won't work because not all dialogue finishes at the end of a paragraph ---> eg. <p>"Let's get out of here!" he yelled.</p>)
Did you remember to escape things?
(\!\?|\?\?|\.\?) just add all the escaped combinations you are looking for, separated by a pipe
theducks is online now   Reply With Quote