Hi there! I am having a problem with regular expressions.
I want to have an expression that will find a minus sign (-) without a backslash before it. For example:
“-” would not be found
“-” would be found and
“-” would be found because the backslash is after the minus sign.
The code for preg split:
$explodeaddons = preg_split("/[^\]-/", $isdisplayarticlewritten[8]);
Looks like it would work but does not. I even escaped the backslash. If anyone could help that would be great as I have searched the net and haven’t found what I am looking for. I tried one, two and three backslashes before the end of the character class.
Thanks for your help!