Use RegExp from config to detect boolean attributes

ref: #1166