I want uppercase word from string
WORDA - WORDB - WORDC - Failure occurring to be verified if a WORDD WORDE is linked to the failure.
the expected output i want for above string is like this :
WORDD WORDE
I want uppercase word from string
WORDA - WORDB - WORDC - Failure occurring to be verified if a WORDD WORDE is linked to the failure.
the expected output i want for above string is like this :
WORDD WORDE
try :
<?php
$a= "WORDA - WORDB - WORDC - Failure occurring to be verified if a WORDD WORDE is linked to the 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]);
?>