<?php $str =" ... {{word1}} {{word2}} .... etc";preg_match_all("/\{\{(\w+)\}\}/", $str, $matches);print_r($matches[1]); ?>
Standard input is empty
Array ( [0] => word1 [1] => word2 )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!