php - Last uppercase word from String -
i want uppercase word string
worda - wordb - wordc - failure occurring verified if wordd worde linked failure.
the expected output want above string :
wordd worde
try :
<?php $a= "worda - wordb - wordc - failure occurring verified if wordd worde linked failure."; $b= '/([a-z|\s\0-9]+)[a-z|\w\|0-9]*$/'; preg_match($b, $a, $c, preg_offset_capture); print_r($c[1][0]); ?>
Comments
Post a Comment