Hey I need need to extract numerical value between \" and \"
So string is like
$a= '\"123\"';
thanks.
Printable View
Hey I need need to extract numerical value between \" and \"
So string is like
$a= '\"123\"';
thanks.
Code:<?php
$a= '\"123\"';
$pattern = '/[0-9]+/';
preg_match($pattern, $a, $matches);
print_r($matches);
?>
Thanks.
What if i want to get numerical value between # and # or between [ and ]?
thanks for help by the way....