Cannot invoke remote function Regex.match?/2 inside guard

You can’t. This is a limitation of the BEAM.