<?php

$pattern = '/(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[,;:])(?=.{8,16})(?!.*[\s]).*/';
$str = "\n\nAb0:padding";

if (preg_match($pattern, $str, $match)) {    //true
  var_dump($match);
} else {
  echo "failed\n";
}

$str = "  Ab0:padding";

if (preg_match($pattern, $str, $match)) {    //true
  var_dump($match);
} else {
  echo "failed\n";
}