[#74955834] fixed regex expressions

added curly braces around if statements