Created
April 28, 2015 01:27
-
-
Save rmccullagh/a874cd753782ae5cc798 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str = "Sending: 6011 1234 4321 1234:12/2016:543.21:John Doe | |
Received: Mon Apr 27 18:07:22 CDT 2015: Discover: 6011 1234 4321 1234 is valid: authorization code: 472080 for $543.21"; | |
$a = preg_split("/\n/", $str); | |
array_shift($a); | |
$c = preg_match_all('/authorization\scode:\s[0-9]+/', $a[0], $matches); | |
$d = preg_split('/\n/', $matches[0][0]); | |
$e = explode(" ", $d[0]); | |
var_dump($e[2]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment