XF 1.4 Apostrophes Used as Quotation Marks

Amaury

Well-known member
This might be impossible, but here goes. Many areas use apostrophes instead of quotation marks for quotes, such as, "Discussion in 'XenForo Questions and Support' started by Brogan, Feb 10, 2015."

I'd like to change all of these, either removing them completely or changing them to actual quotation marks. However, searching for ' includes everything, obviously, such as "...control of this notice's appearance." Obviously, I don't want that and only want things like the example above.

Is there a specific search I could do, similar to how Brogan had me search the templates for "troph" when I wanted to remove all instances of trophy points on our KH-Flare 2014 style, or will I have to comb through the 207 phrase search results, which I don't really mind if I have to?

Thanks.
 
In terms of SQL search (not replace):

Code:
SELECT *
FROM xf_post
WHERE message regexp '".*''.+''.*"'

That's about as accurate as I can get with pattern matching. It will still over-identify a bit.
 
Just to make sure we're on the same page, here are a couple examples showing what I want to do:

Phrases 1.webp

Phrases 2.webp

I know how to edit phrases, but my question is if there's a phrase search I could do to only find things of that pattern? (A word or words surrounded by apostrophes used as quotes.) Or will I need to comb through 207 phrase search results, ignoring things like this? Because if I do a search for just ', then that gets me 207 results and things like this, which I obviously don't want/need to edit:

Phrases 3.webp
 
You could run this query:

Code:
SELECT title, phrase_text
FROM xf_phrase
WHERE phrase_text regexp '.*''.+''.*'

That will get you the phrase titles. Then you can search for those titles one at the time in the Admin CP.
 
Top Bottom