- print_r: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$re = '/\b\d+(?:\.\d+)?(?=mcg\b)/';
$str = 'some text 0.25mcg some more text some text 25mcg some more text';
preg_match_all($re, $str, $matches);
print_r($matches[0]);