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

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -