Hi fellow programmers.
So i am trying to make covertion to PHP regex and I got stuck on converting !A to [^A]
$string = "!A!Bb%!C!";
$string = preg_replace("/(?<=(?<!%)!.)/", "]" , $string );
$string = preg_replace("/(?<!%)!(?=.)/", "[^" , $string);
which works fine but when string is with two !! next to each other its not working for example like this "!A!!Bb%!C!" and the % is nullying the negation.
try here http://www.phpliveregex.com/