You’ve probably experienced the auto tab feature at some point when buying online or signing up to a new website.
This sets a predefined character limit on a field so once the user reaches that number it tabs onto the next one. jQuery AutoTab is a great free plugin to handle this functionality with basically no setup.
With this plugin you can move focus onto inputs forward or backward, preformat the text, and push the user along wherever they need to go. And this does support regex patterns so you can target more complicated tab inputs beyond simple phone numbers.