Beryl has regained hurricane strength just a few hours before it is expected to make landfall on the Texas coast.