Update emailcollector.class.php

For support multiple () and select last () in result regex 
Sample: object.email=EXTRACT:BODY:E-mail(:([a-zA-Z0-9_@.-]*)\n|\r);
This commit is contained in:
oscim 2020-02-21 09:04:24 +01:00 committed by GitHub
parent 1f4b639ba0
commit d255c95661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -812,9 +812,9 @@ class EmailCollector extends CommonObject
//var_dump($tmpproperty.' - '.$regexstring.' - '.$regexoptions.' - '.$sourcestring);
if (preg_match('/'.$regexstring.'/'.$regexoptions, $sourcestring, $regforval))
{
//var_dump($regforval[1]);exit;
//var_dump($regforval[sizeof($regforval)-1]);exit;
// Overwrite param $tmpproperty
$object->$tmpproperty = isset($regforval[1]) ?trim($regforval[1]) : null;
$object->$tmpproperty = isset($regforval[sizeof($regforval)-1]) ?trim($regforval[sizeof($regforval)-1]) : null;
}
else
{
@ -1423,9 +1423,9 @@ class EmailCollector extends CommonObject
//var_dump($regexstring);var_dump($sourcestring);
if (preg_match('/'.$regexstring.'/ms', $sourcestring, $regforval))
{
//var_dump($regforval[1]);exit;
//var_dump($regforval[sizeof($regforval)-1]);exit;
// Overwrite param $tmpproperty
$nametouseforthirdparty = isset($regforval[1]) ?trim($regforval[1]) : null;
$nametouseforthirdparty = isset($regforval[sizeof($regforval)-1]) ?trim($regforval[sizeof($regforval)-1]) : null;
}
else
{