No ending delimiter ‘%c’ found
Description
This error is a regex related error, not a PHP one. The regular expression is the first argument of the call. It is invalid, as regex are supposed to start and end with the same non-alphanumeric character.
Then, PHP stops the process, and returns false. In this case, false may be confused with a failure to find the pattern in the string, and yield unexpected results.
Example
<?php
preg_match('/[a-b]', 'abc');
?>
Literal Examples
- No ending delimiter ‘/’ found
Alternatives
- Fix the regex.
Related error messages
- delimiter-must-not-be-alphanumeric,-backslash,-or-nul-byte
- delimiter-must-not-be-alphanumeric,-backslash,-or-nul
- delimiter-must-not-be-alphanumeric-or-backslash