I have a regular expression that replaces all special characters with % (for database searching with LIKE). It looks like this:
$string =~ s/[^ a-zA-Z0-9]/%/g;
However I don't know how to change that expression to replace all desired special characters EXCEPT for the first one in a string. So if my string look like
"&Hi I'm smart(yeah right...)"
it would be
"&Hi I%m smart%yeah right%%%%"
(Right now the first '&' is also replaced).
Can any one help?