HF RL Explorer

Task: Extract 4-Digit Codes from Text File Using Python Regex

Task: Extract 4-Digit Codes from Text File Using Python Regex: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that searches for 4-digit codes enclosed within angle brackets (e.g., <1234 ) in a text file. The script should use regular expressions combined with file operations…

The task

Write a Python script that searches for 4-digit codes enclosed within angle brackets (e.g., `<1234>`) in a text file. The script should use regular expressions combined with file operations to find all instances of this pattern and store them in a list.

Part of PrimeIntellect/Terminal-Lego-15k.