Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


boostr.in questions - Question:Check for preg_match() Processing Errors!


While it might often be unimportant be aware that applying a regular expression might fail due to PCRE constraints. This usually happens when matching overly long strings or strings with faulty encoding.

The only way to notice that preg_match() was not able to check the string is by calling

preg_last_error()

Only if it returns PREG_NO_ERROR you got a safe result! Consider this when using preg_match() for security purposes.

asked Sep 13, 2013 in PHP by anonymous
edited Sep 12, 2013
0 votes
17 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...