iam trying to check if an user has permission to manage an group:
Expression (ou=|||) is the string I’m looking for
/^OU=|||$|,OU=|||$/i
On a string like "ou=whatever", it returns true (-:
I am sure it’s a problem with the pipes, but I have no idea how to solve this.
I am using PHP 5.x with preg_match.
You need to escape the pipes and include some parenthesis for better readability: