Regular expression
- by atno
Hi
I have an array that its first element might contains something like [some text, here. That's some text]
I'm trying to figure out a pattern to check if such string exists and if not create it but having problem with making the pattern. Here's what I've done so far
$pattern = '/^\[*\]$/';
if(preg_match($pattern,$exploded[0])){
$name =…