thanks for the help cunts
figured it out
Code:
$haystack = 'voor een gebruiksfunctie in tabel 2.5 voorschriften zijn'; //example text
$match = '#b(tabel)(s{1})([0-9.]{1,})#'; //(first match the word 'tabel') (second match a single whitespace character) (third match a word which consists of numbers and dots only) -->matches stored in variables ordered in the sequence they are indexed/ started
$replace = "<a href="#" onClick="javascriptwinBRopen('view/table/?tabel_nr=$3', '', 800, 600, 0, 0, 0, 0)">$1$2$3</a>";
return preg_replace($match, $replace, $haystack);