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

javascript - Create websocket without connecting -

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

Android SDK Manager freezes after installation of OSX 10.11 El Capitan public Beta -