Created
October 17, 2012 05:12
-
-
Save tareko/3903808 to your computer and use it in GitHub Desktop.
reg matching..
This file contains hidden or 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
| function import ($filename) { | |
| App::uses('File', 'Utility'); | |
| // Set the filename to read from | |
| $filename = TMP . 'uploads' . DS . 'Billing' . DS . $filename; | |
| echo $filename; | |
| // Open the file | |
| $file = new File($filename, FALSE); | |
| $file->open(); | |
| // Grab the contents | |
| $contents = $file->read(); | |
| // Start parsing for health encounters | |
| preg_match_all('/HEB(.+?)HEE/ism', $contents, $matches); | |
| foreach($matches as $matches_sub) { | |
| foreach ($matches_sub as $match) { | |
| preg_match_all('/HEH(.+?)(?=HEH)/ism', $match, $match1); | |
| debug($match1); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment