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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -