Versions Compared

Key

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

...

extract(regular expression): returns part of the string that matches the parenthesized section of the regular expression.
{{ message.extract(/Host: (\S+)/) }}

You can refer Regular Expression for further information about extract methodLearn more about the extract method.

Info

Regex match operations has 10 seconds timeout limit. If it takes more than 10 seconds, it returns "null"string.

...

toDate(String dateTimeFormat): returns date time conversion of a timestamp. Time format argument should follow follow the Java's Simple Date formatting pattern. Uses default value of "GMT" for time zone.
{{ message.toDate("yyyy-MM") }}

toDate(String dateTimeFormat, String timeZone): returns date time conversion of a timestamp. Time format argument should follow follow the Java's Simple Date formatting pattern.
{{ message.toDate("yyyy-MM", "GMT+2") }}

...

urlEncode(): Converts a string to the application/x-www-form-urlencoded MIME MIME format, based on the UTF-8 character set. For Learn more information about the escape characters, you can refer Special about special characters in URI attribute values.
{{ subject.urlEncode() }}

...