From b71a4405320d334f2f1e54b6b9c824207bcb9d30 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Tue, 9 Sep 2025 13:34:21 +1200 Subject: [PATCH] [FileFormats.LP] fix for regex match on very long lines --- src/FileFormats/LP/LP.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FileFormats/LP/LP.jl b/src/FileFormats/LP/LP.jl index bfc53cdc06..3199a49c91 100644 --- a/src/FileFormats/LP/LP.jl +++ b/src/FileFormats/LP/LP.jl @@ -809,7 +809,7 @@ function _parse_section( cache.constraint_name = "R$(cache.num_constraints)" end end - if cache.indicator === nothing + if cache.indicator === nothing && occursin("->", line) if (m = match(r"\s*(.+?)\s*=\s*(0|1)\s*->(.+)", line)) !== nothing z = _get_variable_from_name(model, cache, String(m[1])) cond = m[2] == "0" ? MOI.ACTIVATE_ON_ZERO : MOI.ACTIVATE_ON_ONE