paste.xcode.ro » ~/paste/1035

  1. <?php
  2.  
  3. $str = '<form action="/dk?st.cmd=altGroupMain&amp;st.groupId=51746804793453&amp;_prevCmd=altGroupMain&amp;bk=AltGroupEditMediaTopicForm&amp;STKN=iGy73YqwmcSF0VK7m8Di2gvbp7M%2ByrXM&amp;tkn=8504" method="post">';
  4.  
  5. preg_match( '/AltGroupEditMediaTopicForm&amp;STKN=([^;]+)/', $str, $rets );
  6.  
  7. print_r( $rets );
  8.  
  9. ?>
  10.  
  11.  
  12.  
  13. OUTPUT:
  14.  
  15. ]# php regex.php
  16. Array
  17. (
  18.     [0] => AltGroupEditMediaTopicForm&amp;STKN=iGy73YqwmcSF0VK7m8Di2gvbp7M%2ByrXM&amp
  19.     [1] => iGy73YqwmcSF0VK7m8Di2gvbp7M%2ByrXM&amp
  20. )
  21.  
Language: php
Posted by xxx at 03 Sep 2013, 04:46:22 Europe/Bucharest