View Single Post
Old 04-09-2013, 07:18 PM  
Mr Pheer
So Fucking Banned
 
Industry Role:
Join Date: Dec 2002
Posts: 21,582
Can someone help with a PHP problem?

So I've got this piece of code that wont play nice.

Code:
preg_match_all("/(\{\[)([\w-\d\s\.\|']*)(\]\})/i",$replace_text, $match);
What it is supposed to do, is allow an apostrophe to be in my replacement text. So in my text, where i have "{[SPIN--they are|they?re]}" it should return "they are" or "they're".
But instead, it simply does nothing and spits out the entire spintax code just as I typed above.

The only time this does not work, is when a replacement text has an apostrophe. It works perfectly everywhere else. Been trying to fix this for two days and I'm about to throw my keyboard through my fucking monitor.

Can someone help, please?
Mr Pheer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote