|
Posted by Janwillem Borleffs on 02/25/07 11:14
erikcw wrote:
> Your selution is simple and elegant. Unfortunatly, it puts brackets
> around every line. I need it to ignore lines with "" around them, as
> well as line that start with a '-' and lines that end in a ** 0.00
> need the ending bracket before the **.
>
Perhaps with some fix up patterns:
$PATTERNS = array('/(\[|\])/', '/([^\r\n]+)/', '/(\["|"\])/',
'/(\[)\-(.+)(\])/',
'/(\[)(.+)([*]+)(.+)(\])/');
$REPLACEMENTS = array('', '[$1]', '"', '-$2', '[$2$3]$4');
JW
Navigation:
[Reply to this message]
|