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

go - serving up pdfs using golang -

python - Best design pattern for collection of objects -

r - Using `bbmle:mle2` with vector parameters (already works using `optim`) -