src/Manipulator.php
public function removeSpecialCharacters(array $exceptions = []) : Manipulator
    {
        $regEx  = "/";
        $regEx .= "[^\w\d";

        foreach ($exceptions as $exception) {
            $regEx .= "\\" . $exception;
        }

        $regEx .= "]/";

        $modifiedString = preg_replace($regEx, '', $this->string);

        return new static($modifiedString);
    }
public function removeSpecialCharacters(array $exceptions = []) : Manipulator
    {
        $regEx  = "/";
        $regEx .= "[^\w\d";

        foreach ($exceptions as $exception) {
            $regEx .= "\\" . $exception;
        }

        $regEx .= "]/";

        $modifiedString = preg_replace($regEx, '', $this->string);

        return new static($modifiedString);
    }
public function removeSpecialCharacters ( array $ exceptions = [ ] ) : Manipulator { $ regEx = "/" ; $ regEx .= "[^\w\d" ; foreach ( $ exceptions as $ exception ) { $ regEx .= "\\" . $ exception ; } $ regEx .= "]/" ; $ modifiedString = preg_replace ( $ regEx , '' , $ this -> string ) ; return new static ( $ modifiedString ) ; }
Remove non-alphanumeric characters.

@param array
@return object|Manipulator
Remove non - alphanumeric characters .