by vod3177 » Mon Oct 02, 2006 9:45 pm
That worked great thanks! I have a few more questions that maybe you can help with:
1. Is it possiable to run a macro on multiple files at once and if so how?
2. I want to find a pattern and insert a new line and some text after it. Such as the following:
$result = oci_parse($query, $conn);
Would like to turn into:
$result = oci_query($query, $conn);
$r = oci_parse($query)
Where the red text is found and inserted into the line that is added. Not sure how to explain that, so I hope I did ok. The variable will always be differently named but it will always be a '$' followed by a legitimate variable name. Not sure how to insert in a new line so that is the hardest part for me. If I could turn it into a macro even better.
3. I would like to find any occurrence of the following and delete it. It will be part of a line so i don't want the line deleted only the occurrence. The catch is that it will always have a diff variable name it. So that will have to be claused. It will be any legit variable such as a-z any case 0-9 _ and - That is rep by the red text below and yes that is a space before it. I want to delete all but the ';' since that will be needed to end the line in the code.
(space)or mysql_error($query);
Thanks for any help and I hope I described it well enough.