<?php
$source = '<input type="hidden" class="embed-unikal" value="one"/><input type="text" value="two"/>';
$text = '';
preg_match_all('~<(?:input).*?value="([^"]*)".*?\/>~', $source, $text);
foreach($text[0] as $key => $value)
{
if(strpos($value, "embed-unikal") !== false)
{
echo $text[1][$key];
}
}