Product code is ISBN#

Hello! I want to setup the product code as the ISBN# that will following the pattern with dash like this: 978-0-12-345678-9. How do I make it to add ‘-’ automatically? Please advice.