Guest User

Untitled

a guest
Sep 19th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. //$voice_vlan = parse_datas(array('line'=>$ligne,'regexp'=>'/VoIP VLAN Reply: (.*)/i'));
  2.  
  3. function parse_datas($params=array('line'=>'','regexp'=>'')) {
  4. $line = $params['line'];
  5. $regexp = $params['regexp'];
  6. $correspondances = array();
  7. $resultat = '';
  8. if (preg_match_all($regexp, $line, $correspondances, PREG_SET_ORDER)) {
  9. foreach ($correspondances as $correspondance) {
  10. $resultat = trim($correspondance[1]);
  11. }
  12. }
  13. return $resultat;
  14. }
Add Comment
Please, Sign In to add comment