Yeah this looks good.  One more thing I just thought of, though.  We should probably compile the RE2 object once rather than for each line.  Let me find a place we do this.