Closed manulera closed 1 year ago
Actually, this should not be the case, because we want to match the entire negative number with parenthesis e.g. (-123)
, and not just -123
, otherwise when using replace_allele_features_with_syntax_rules
, the parenthesis would be left out and unmatched.
I could think of a regex like \((-\d+)\)|\((-?\d+)\)
, which matches the entire thing but only captures the number in the group. However, when calling groups()
on the match, it would return an empty group and a filled one, complicating things for apply_syntax
.
Maybe the group should match the negative number only, and not the parenthesis. This would be useful for future formatting.