Hi everyone! I have a problem with a very simple solution I've just been unable to find :D Say you have a text file that says "My name is jeffc418. My name is kkeith29. My name is =IceBurn=." How do you get it to say just:
jeffc418
kkeith29
=IceBurn=
Would you use some explodes (which I couldn't get to work) or some preg_match_all's?
Here's the problem I have now:
I have a several hundred page list of names and phone numbers, along with some other garbage. It looks like this:
Last Name, First Name Phone:(H) ######## Birth:##/##/#### ...Patient
The ... means that there's a bunch of more information that I just don't need I simply need a script that saves the Name and Phone Number to a MySQL table. Here's what I've tried so far:
<?php
ob_start();
include_once('listtext.txt');
$listtext = ob_get_contents();
ob_end_clean();
preg_match_all("/(Patient|INFORMATION)(.*)[Phone:(H) ](.*)[Birth]/", $listtext, $array);
print_r($array);
echo "<br><br>";
echo $listtext;
?>
To no avail. Any help would be greatly appreciated :D My main problem is writing the expression (and I've tried many guides and such). Thanks and have a happy holiday!