Trying to strip characters: / and \
<p>I am having issues trying to strip / and \ characters. When i try to strip using \\ it strips \ but when I try /// it doesn't strip / at all.</p>

<pre><code>function stripinname( $text )
{
$text = preg_replace(
    array(
        '/\|/','/\"/','/\&lt;/','/\&gt;/','/\s[\s]+/','/^[\-]+/','/[\-]+$/','/\%/','/\\\\/','/\////','/\@/','/\&amp;/','/\:/','/\;/','/\-/',
        '@&lt;head[^&gt;]*?&gt;.*?&lt;/head&gt;@siu',
        '@&lt;style[^&gt;]*?&gt;.*?&lt;/style&gt;@siu',
        '@&lt;script[^&gt;]*?.*?&lt;/script&gt;@siu',
        '@&lt;object[^&gt;]*?.*?&lt;/object&gt;@siu',
        '@&lt;embed[^&gt;]*?.*?&lt;/embed&gt;@siu',
        '@&lt;applet[^&gt;]*?.*?&lt;/applet&gt;@siu',
        '@&lt;noframes[^&gt;]*?.*?&lt;/noframes&gt;@siu',
        '@&lt;noscript[^&gt;]*?.*?&lt;/noscript&gt;@siu',
        '@&lt;noembed[^&gt;]*?.*?&lt;/noembed&gt;@siu',
      // Add line breaks before and after blocks
        '@&lt;/?((address)|(blockquote)|(center)|(del))@iu',
        '@&lt;/?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))@iu',
        '@&lt;/?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))@iu',
        '@&lt;/?((table)|(th)|(td)|(caption))@iu',
        '@&lt;/?((form)|(button)|(fieldset)|(legend)|(input))@iu',
        '@&lt;/?((label)|(select)|(optgroup)|(option)|(textarea))@iu',
        '@&lt;/?((frameset)|(frame)|(iframe))@iu',
    ),
    array(
        ' ',' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',"$0", "$0", "$0", "$0", "$0", "$0","$0", "$0",), $text );

// you can exclude some html tags here, in this case B and A tags        
return strip_tags($text);
}
</code></pre>
