dragonwell
Programmer
Need to remove RTF tags. I found this PHP code in a forum and I'm trying to use the expressions:
Apparently the preg_replace function can take an array of expressions to match. I figure I can just take both expressions and combine them with the | operator. What would that expression look like?
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)
Code:
$Abstracts = $fields->$Abstract;
//time to clean up those unwanted rtf codes
$matches = array('/(\{\\\)(.+?)(\})/','/(\\\)(.+?)(\b)/');
$CleanedAbstracts = preg_replace($matches,'',$Abstracts);
$CleanedAbstracts = str_replace('}','',$CleanedAbstracts);
$CleanedAbstracts = trim($CleanedAbstracts);
Apparently the preg_replace function can take an array of expressions to match. I figure I can just take both expressions and combine them with the | operator. What would that expression look like?
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)