how to detect all symbol on mathematical operators on php using regex?
example :
$operators = [">0",">=1","==12","<9","<=1","!=4"];
$results = array();
foreach ($operators as $key => $value){
detect $value using regex, if include symbol of maths operators {
array_push($results, $value);
// just push $value with format of symbol of maths operators, example : ">" // remove 0 on my string
}
}
from my array i want to collect just math operators, my expected results:
$results = [">",">=","==","<","<=","!="];
how to do that? thank you advanced