<?php

error_reporting(-1);

$text = 'Кaнцелярских тoваров';
$regexp = '/[а-я]+([a,o,p])[а-я]+/ui';
$matches = array();
$result = preg_match_all($regexp, $text, $matches, PREG_SET_ORDER);
var_dump($matches);
//echo "{$result}";

// your code goes here