Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this example script it will use Regex for a matching value within the Email Body. If matched then it will add the extracted as the value for the Custom Field.

Info

If you have to use “\”, you will need to ensure that you use “\\” instead. e.g. \\:\\sTEST

Code Block
var regx = new RegExp("Ref:[0-9]+").exec(body); //Check Email Body for a match
if(regx !== null)
{
    print("matched value: " + regx[0]);  //Prints out the matched value
    result.setValue(regx); //Sets the value to matched Regex
}

...