<?php $string = '[Salut] [toi][,] [ça] [va] [?]'; $regex = '/\[.*\]/im'; preg_match($regex, $string, $new_string); var_dump($new_string);
You have javascript disabled. You will not be able to edit any code.