this is a bolded text between html strong tags Here we want to pull out the freemarker into tags, but pass through the text and the brace value: <#if contactInfo??> or ${contactInfo}. Here we ensure that we get the single else and handle the double quotes: <#if smb.maxAlarmLevel == "notice">Important<#else>Urgent information regarding ${sbsName} Another test with lots of regexee text: <#if commentAuthorURL?has_content> ${commentAuthorName} <#else>${commentAuthorName} View all comments on this event Ensure we pull don't break early on parentheses: ${totalTaskCount} upcoming <#if (overdueTasks.size() > 0)> (${overdueTasks.size()} overdue)