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

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -