fork download
  1. <?php
  2.  
  3. $atk="[2] Skedaddle (20) Shuffle Aipom and all basic Energy cards attached to it into your deck. (Discard all other cards attached to Aipom.) (If you have no Benched Pokemon, this attack does nothing.)";
  4.  
  5. preg_match('#\[(.*?)\] (.*?) \((.*?)\) (.*)#', $atk, $matchatk2);
  6. $atkcost = $matchatk2[1];
  7. $atkname = $matchatk2[2];
  8. $atkdmg = $matchatk2[3];
  9. $atktext = $matchatk2[4];
  10.  
  11. echo $atkcost ."\n";
  12. echo $atkname ."\n";
  13. echo $atkdmg ."\n";
  14. echo $atktext ."\n";
Success #stdin #stdout 0.02s 24144KB
stdin
Standard input is empty
stdout
2
Skedaddle
20
Shuffle Aipom and all basic Energy cards attached to it into your deck. (Discard all other cards attached to Aipom.) (If you have no Benched Pokemon, this attack does nothing.)