Google Interview Question

Parse a IPv4 address using RegEx

Interview Answer

Anonymous

Sep 17, 2018

This can be a possible solution: ^(([1-2]?[1-9 ]?[0-9])\.([1-2]?[1-9 ]?[0-9])\.([1-2]?[1-9 ]?[0-9])\.([1-2]?[1-9 ]?[0-9]))$