I want to use sed to replace one or more consecutive spaces with a single tab, where the new word starts with a digit. Currently using bash with the following:
sed -i 's/[[:blank:]]\+/\t/g' file.txt
The file could look something like this and there are only spaces:
Foo 100
Bar 1000
Foo Baz 33
Lorem ipsum 55
The last two lines are also space delimited, but there I want have Foo Baz
and Lorem ipsum
not be tab delimited, because Baz
nor ipsum
start with a digit. How do I change the code to make this happen?