Task: Extract First Word Before Space Using Regular Expression
Task: Extract First Word Before Space Using Regular Expression: a task in Terminal-Lego-15k (Harbor dataset). You are given an input file containing multiple lines of tab/space-separated data. Your task is to write a solution that uses a regular expression to extract the first word (everything…
The task
You are given an input file containing multiple lines of tab/space-separated data. Your task is to write a solution that uses a **regular expression** to extract the first word (everything before the first whitespace character) from each line of the input file.
Part of PrimeIntellect/Terminal-Lego-15k.