Hi,
I would like to extract the figures from a string. The string is MYR1,200. I want to extract the 1,200. Also the figures can be three e.g MYR800. So I want to extract the figure regardless of whether they are 3 or 4. kindly assist
Thanks
Extract word after a keyword
Moderator: General Moderators
Re: Extract word after a keyword
Code: Select all
$string = 'MYR5483';
echo substr($string, 3);Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Re: Extract word after a keyword
Code: Select all
preg_match('#\D+(\d+,?\d+)#', $input, $match)There are 10 types of people in this world, those who understand binary and those who don't