Skip to content

Instantly share code, notes, and snippets.

@abelcallejo
Created May 9, 2020 12:09
Show Gist options
  • Save abelcallejo/201ebd7108a62d99b9ec32cf9312546f to your computer and use it in GitHub Desktop.
Save abelcallejo/201ebd7108a62d99b9ec32cf9312546f to your computer and use it in GitHub Desktop.
Regex validation with PHP

Regex validation with PHP

ISO Date

<?php
preg_match("/^(\d{4})-(\d{2})-(\d{2})$/", "1970-01-01");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment