Hello all,
Having some difficulty with what should be a simple regular expression.
I'm trying to check that the following string is in the appropriate format:
Page[page.php]
Should begin with any string of characters, then a '[' then another string, then a closing ']' (with no characters after the closing ']')
So basically wildcard[wildcard]
I think I'm having difficulty escaping the brackets as they are being read as part of the expression.
$pattern = '/s^[s]&/';
$value = 'Page[page.php]';
$match = preg_match($pattern, $value);
Any help very much appreciated.