Hello All,<br><br>I have figured out how to open a text file and erase and add new
content... I also know how to add content at the end of the file....<br><br>How do I do search and replace?<br><br>This is the default look for the line of code:<div class="im"><br> 1167-67271: 10/18 6:45p 186MB 111Pts v8.55.4/9.0.2.3642 Tipsword, Georgia SUCCESS <br>
<br></div>This is how I was told to format it (a little more complex than before):<br><br>1167,
67271, 10/18/2010(CONVERT TO DATE FORMAT), 6:45p(CONVERT TO TIME FORMAT
18:45), 186000000, 111, v8.55.4, 9.0.2, 3642, Tipsword, Georgia,
SUCCESS<br><br>This is the code that I have so far:<br><br><?php<br>$myFile = "test.txt";<br>$fh = fopen($myFile, 'r+') or die("can't open file");<br><br>WHAT CAN I PUT HERE TO REPLACE ALL THE SPACES AND THEN ADD A COMMA WEAR NEEDED?<br>
<br>fclose($fh);<br><br><br>--------------------<br>It needs to be a script because it has hundreds of lines and the report comes in once a day. Any ideas? <br><br>Any help is appreciated,<br><br>Holly Ferree<br><br>(one person I asked suggested using visual basic instead of php by creating a .vbs or .vba script using Regular Expressions (Regex) (mix of
find and replace strings like \s+ .... any help on what experssions to use would be great) and then using an action in outlook
2007 to run the script when the subject name of Connect Report with the
connect.txt attached is recieved)<br>
<br>