preg match - php preg_match exclude negative number -
preg_match_all('/(\b[0-9]+)/',"this -44 55433 example",$amatches);
this grab numbers, how exclude minus in front of -44.
thanks
maybe solution you
preg_match_all( '/(?:^|[^\-\d])(\d+)/' , 'this -44 55433 example', $matches ); var_dump($matches[1]);
Comments
Post a Comment