fork download
  1. <?php
  2.  
  3. $str= "spawn needle /var/www/html/trabalho/arquivo/emboss/needle/alvos.txt /var/www/html/trabalho/arquivo/emboss/needle/modelos.txt Needleman-Wunsch global alignment of two sequences Warning: Unknown swissprot line type ' ' Warning: Unknown swissprot line type ' ' Warning: Unknown swissprot line type ' ' Warning: Unknown swissprot line type ' ' Warning: Unknown swissprot line type ' ' Warning: Unknown swissprot line type ' ' Warning: Unknown swissprot line type ' ' Warning: Unknown swissprot line type ' ' Gap opening penalty [10.0]: 10.0 Gap extension penalty [0.5]: 0.5 Output alignment [hba_human.needle]:";
  4.  
  5.  
  6. $posInicio = strripos($str, "[");
  7.  
  8. $posFim = strripos($str, "]");
  9.  
  10. $quant= ($posFim-$posInicio-1);
  11.  
  12.  
  13. echo substr($str, $posInicio+1, $quant);
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
hba_human.needle