<?php

$data = "This is my text how do you like it @[John Doe (#6)](client:6) and do you have any thoughts @[Jane Doe (#7)](client:7)";

$regex = "~@\[[^][]+\]\s*\(\K[^()]+~";

preg_match_all($regex, $data, $matches);

print_r($matches);

?>
