Negation

not

The not method negates the next expression.

use Rudashi\Regex;
 
$pattern = Regex::build()->not()->word();
 
// /[^\w]/

Alternatively, you can use the not property, which works identically.

use Rudashi\Regex;
 
$pattern = Regex::build()->not->word();
 
// /[^\w]/
Fluent Regex
rudashi · © 2024 All rights reserved