Skip to content

Instantly share code, notes, and snippets.

@pulketo
Forked from lerua83/extractNumbersString.php
Created January 31, 2019 17:12
Show Gist options
  • Select an option

  • Save pulketo/dbea1d7d03bb5afa3ea275456b09035f to your computer and use it in GitHub Desktop.

Select an option

Save pulketo/dbea1d7d03bb5afa3ea275456b09035f to your computer and use it in GitHub Desktop.

Revisions

  1. @lerua83 lerua83 revised this gist Nov 13, 2013. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion extractNumbersString.php
    Original file line number Diff line number Diff line change
    @@ -1 +1,3 @@
    $str = 'In My Cart : 11 12 items';preg_match_all('!\d+!', $str, $matches);print_r($matches);
    $str = 'In My Cart : 11 12 items';
    preg_match_all('!\d+!', $str, $matches);
    print_r($matches);
  2. @lerua83 lerua83 created this gist Nov 13, 2013.
    1 change: 1 addition & 0 deletions extractNumbersString.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    $str = 'In My Cart : 11 12 items';preg_match_all('!\d+!', $str, $matches);print_r($matches);