$pattern = '/(^|\A|\s|\-)' . $word . '(о|а|ом|у|ам|ами|е)?[^а-яА-Я]*?(\s|$|\Z|\-)/';
                  
                  
                              preg_match($str, $pattern, $matches);
                  
                  
                              print_r($matches); 
                  
                  
                   Delimiter must not be alphanumeric or backslash
                  
                  
                
lol, патерн и строка не так метами
Обсуждают сегодня