Error: Array.last with String.pregMatch

Hi there, Array.last combined with String.pregMatch results in an error (Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 330375728 bytes) in /var/www/html/Packages/Framework/Neos.Flow/Classes/Error/Debugger.php on line 335)


content = ${q(node).property('title')}
alignment = ${String.pregMatch(this.content, "/text-align:\s*(\w*)/i")} 

gives me an array:

Flow Variable Dump
 integer 0 => 'text-align: right' (17)
 integer 1 => 'right' (5)

This will break:
alignment = ${Array.last(String.pregMatch(this.content, "/text-align:\s*(\w*)/i"))}

Not coming from a node, it will work: content = '<h1 style=text-align: right">Some headline</h1>'
I can’t increase the memory_limit of 512M. I’m using Neos 3.2.1.

What am I doing wrong?

Edit: The same error happens with imageUri = ${Array.length(String.pregMatch(q(node).property('image').resource.filename, "/\.svg$/i"))}
String.pregMatch is not my friend. :disappointed:

Edit2: Increased the memory limit out of desperation to 1024 MB… there’s still no useful error.