First Last Prev Next    No search results available
: Multiple %matchTextFrom% in a line returns only 1 result
Bug#: 26688
: smarttemplate4
: General
Resolution: FIXED
: PC
: Windows NT
: unspecified
: P2
: normal
: ---

  Show dependency tree - Show dependency graph
Reporter: Axel Grude <>
Assigned To: Axel Grude <>



You need to log in before you can comment on or make changes to this bug.

Related actions

Description:   Opened: 2019-08-10 08:35
When using multiple %matchTextFromBody()% or %matchTextFromSubject()% functions
within a line, the match seems to only work for the first function.


<p>Hallo %matchTextFromBody("Vorname: ([-'a-zA-Z\u00C0-\u024F]*)",1)% 
%matchTextFromBody("Nachname: ([-'a-zA-Z\u00C0-\u024F]*)",1)%, </p>

This was used to extract first + last names from en Emil formatted as follows:

Von: <>
Vorname: Willi
Nachname: Waldmeister

It only returned:

<p>Hallo Willi,</p>
------- Comment #1 From Axel Grude 2019-08-10 08:37:43 -------
I modified the search patterns for matchTextFromBody and matchTextFromSubject
as follows:


By adding a ? character after the * the pattern will stop at the earliest place
possible before hitting the enclosing )% pattern.
------- Comment #2 From Axel Grude 2019-08-11 13:04:20 -------
Resolved fixed in 2.2, released 12/Aug/2019

First Last Prev Next    No search results available