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:
parent
1f4b639ba0
commit
d255c95661
@ -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
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user