I'm trying to remove a specific 'span' call without affecting other spans.
The code below returns an error - how can I achieve this?
$exampleString = '<span class="caps">THIS</span> <span class="caps">IS</span> <span class="caps">IN</span> <span class="caps">CAPS</span>';
$fixed = eregi_replace('^(<span class="caps">)([a-zA-Z0-9[:space:]\s[:punct:])+(</span>)','',$exampleString);
Error Message:
<b>Warning</b>: eregi_replace() [<a href='function.eregi-replace'>function.eregi-replace</a>]: REG_EBRACK in <b>PHPDocument3</b> on line <b>4</b><br />
I know this is a newbie question, and I will continue researching all the ins and outs of regex, but I need to get this fixed quick (this is happening on the production server) so I'm posting here - I apologize for wasting anyone's time and thank you in advance to anyone willing to assist me.