Task: Match Only Valid Roman Numerals with a Regular Expression
Task: Match Only Valid Roman Numerals with a Regular Expression: a task in Terminal-Lego-15k (Harbor dataset). Write a script that uses a regular expression to filter only valid Roman numerals (representing values 1 through 3999) from an input file. The regex must enforce all structural rules of…
The task
Write a script that uses a **regular expression** to filter only valid Roman numerals (representing values 1 through 3999) from an input file. The regex must enforce all structural rules of Roman numeral notation, including:
Part of PrimeIntellect/Terminal-Lego-15k.