1: 2: 3: 4: 5: 6: 7: 8: 9:
<?php $metar = "2010/08/01 22:00 CYYZ 012200Z 14005KT 15SM SCT031TCU BKN069 OVC300 BKN069 BKN079 23/18 A2981 RETS RMK TCU4AC3CI1 SLP097"; preg_match("/BKN([^ ]*)/", $metar, $matches); if ($matches) { echo $matches[1]; } else { echo "no match"; } ?>