You're delimiter is the / character. As soon as it hit it again (ie here: '/(0[1-9]|1[012])[- /), it considers everything else to be outside of the patterns and is expecting modifiers (such as msiU, etc). Correct it by either choosing a new delimiter (other common ones are # and |), or by escaping you're current / with \, so \/ instead.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
You're delimiter is the / character. As soon as it hit it again (ie here: '/(0[1-9]|1[012])[- /), it considers everything else to be outside of the patterns and is expecting modifiers (such as msiU, etc). Correct it by either choosing a new delimiter (other common ones are # and |), or by escaping you're current / with \, so \/ instead.
Is this a regular expression thing or a PHP thing, because I grabbed this expression from a library of regular expressions.
That I couldn't tell you for certain. I would suspect it is a regular expression thing; logically the pattern thinks its complete when you've provided it with an ending delimiter.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Unless the author just had an off moment. It hapens to us all on occasion. If the same type of error is present in several regex, however, then the quality of the guidance would be debatable.
Unless the author just had an off moment. It hapens to us all on occasion. If the same type of error is present in several regex, however, then the quality of the guidance would be debatable.
Yeah, if it was in a PHP page (.php, or any plain text), its definitely wrong. If it was on a webpage, it could have been a stripping issue (magic_quotes_runtime can potentially do that to you).
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php