lundi 24 février 2020

laravel preg_replace Compilation failed: invalid range in character class

Please take a look at blew error and my code.Something Am I missing anything?

call stack

in /app/Http/Controllers/Controller.php line 217
at HandleExceptions->handleError('2', 'preg_replace(): Compilation failed: invalid range in character class at offset 13', '/app/Http/Controllers/Controller.php', '217', array('string' => 'gegegeg', 'separator' => '-'))
at preg_replace('/[^a-z0-9_\-\s-ءاأإآؤئبتثجحخدذرزسشصضطظعغفقكلمنهويةى]/u', '', 'gegegeg') in Controller.php line 217
at Controller->make_slug('gegegeg') in AdsController.php line 153
at AdsController->FormAds('14', '71', '97', object(Request))
at call_user_func_array(array(object(AdsController), 'FormAds'), array('main_id' => '14', 'sub_id' => '71', 'typ_id' => '97', object(Request))) in Controller.php line 80

Code

 echo preg_replace('/[^a-z0-9_-s-ءاأإآؤئبتثجحخدذرزسشصضطظعغفقكلمنهويةى]/u', '', 'gegegeg');

Error:

preg_replace(): Compilation failed: invalid range in character class at offset 13

Best Regards



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire