fork download
  1. <?php
  2.  
  3. $str1 = "nome = stack";
  4. $str2 = "id <5";
  5. $str3 = "senha != over";
  6.  
  7. $arr1 = preg_split("/([^\w\s]+\s*)/", $str1, -1, PREG_SPLIT_DELIM_CAPTURE);
  8. echo $arr1[0] . $arr1[1] . "\n";
  9. echo $arr1[2] . "\n";
  10.  
  11. echo "\n";
  12.  
  13. $arr2 = preg_split("/([^\w\s]+\s*)/", $str2, -1, PREG_SPLIT_DELIM_CAPTURE);
  14. echo $arr2[0] . $arr2[1] . "\n";
  15. echo $arr2[2] . "\n";
  16.  
  17. echo "\n";
  18.  
  19. $arr3 = preg_split("/([^\w\s]+\s*)/", $str3, -1, PREG_SPLIT_DELIM_CAPTURE);
  20. echo $arr3[0] . $arr3[1] . "\n";
  21. echo $arr3[2] . "\n";
  22.  
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
nome = 
stack

id <
5

senha != 
over