Bugfix: no longer attempts to run regex when a matching element is empty