var str = "Lorem 'vendor/img/pict.jpg' ipsum 'vendor/js/srcipt.js' dolor sit amet, 'lib/ls/jquery/jquery.min.js' consectetur 'img/pict.jpg' adipisicing 'vendor/style/some-style.min.css' elit. Adipisci, tenetur?";
var re = /'vendor\/(\S?\.(?:css|js))'/g;
var m, matches = [];
while(m = re.exec(str)) {
matches.push(m[1]);
}
console.log(matches);
https://jsfiddle.net/jmsa75zj/ var testStr = "Lorem ipsum 'vendor/js/srcipt.js' dolor sit amet, 'lib/ls/jquery/jquery.min.js' consectetur 'img/pict.jpg' adipisicing 'vendor/style/some-style.min.css' 'vendor/style/some-style.less' или 'vendor/img/bla.png' elit. Adipisci, tenetur?";
var reqExpWrapper = new RegExp('(?:vendor/)((?:.*?)\\.(?:css|js))\'', 'g');
var matches = new Array();
while(match = reqExpWrapper.exec(testStr))
{
matches.push(match[1]);
}
console.log(matches);
<?php if (!isset($this->request->get['route'])) {
$this->request->get['route']='common/home'; // Чтобы не выдавало ошибку, если юзер набрал адрес в браузере руками
} ?>
<?php if ($this->request->get['route']=='common/home') { ?>
<li>
<a href="/" class="active">Главная</a>
</li>
<?php } else { ?>
<li>
<a href="/">Главная</a>
</li>
<?php } ?>