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

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

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

html - jQuery UI Sortable - Remove placeholder after item is dropped -