- implode: documentation ( source)
- preg_split: documentation ( source)
<?php
$value = "[Code][WST-2587] hello world";
print($value);
$trimPattern = '/^[”’"\'(<]*@?(.+?)[.”’"\'\,!?:;)>]*$/';
print($trimPattern);
$projects = array('IC', 'WST');
print($projects);
$calloutPattern = "/^(?:" . implode('|', $projects) . ")-[0-9]+$/";
print($calloutPattern);
$words = preg_split('/(\s+)/', $value);
print($words);
$callouts = array();
print($callouts);