- preg_match: documentation ( source)
- print_r: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$REF_SEARCH = '/[\$%@][a-zA-Z0-9_\.]+/';
$REF_PARSE = '/^([\$%@])([a-zA-Z0-9_\.]+)/'; //todo or statement
$smnt = '$sqwee.seqeqe|%_sdae.ss';
$search = preg_match_all($REF_SEARCH, $smnt, $searched);
print_r($searched);
$pl = preg_match($REF_PARSE, $smnt, $matched);
print_r($matched);