Eggzorcist Posted November 6, 2010 Share Posted November 6, 2010 Is it possible using the limiters {} to show only the minimum requirement with no maximum requirement. if(filter_var($message, FILTER_VALIDATE_REGEXP, array("options"=>array("regexp"=>"/{7}/"))) === false){ echo $error['message'] = "ERROR"; } I get an error with this, and without the backslashes too... Any other ways? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/217949-simple-regex-expression/ Share on other sites More sharing options...
.josh Posted November 6, 2010 Share Posted November 6, 2010 {...} is a range quantifier. Example: {n} n occurrences exactly {n,} At least n occurrences {,m} At most m occurrences {n,m} Between n and m occurrences What your pattern says is..."match exactly 7 of...." except you aren't actually matching for anything in that pattern. Please explain what it is you are actually trying to match. Quote Link to comment https://forums.phpfreaks.com/topic/217949-simple-regex-expression/#findComment-1131157 Share on other sites More sharing options...
Eggzorcist Posted November 6, 2010 Author Share Posted November 6, 2010 I've actually solved this problem. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/217949-simple-regex-expression/#findComment-1131162 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.