Skip to content

Instantly share code, notes, and snippets.

@badah
Created February 22, 2017 21:21
Show Gist options
  • Save badah/991d2cd92f546fc41576847ab3bd9f27 to your computer and use it in GitHub Desktop.
Save badah/991d2cd92f546fc41576847ab3bd9f27 to your computer and use it in GitHub Desktop.
Remove string mask
<?php
$masked_input = '30.029.920-19';
preg_replace('/[^0-9]/', '', $masked_input);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment