in reply to simplifying an expression
Or at least they look a lot like the pages I wrote for them. :)
Okay... I have something. I believe is is somewhat less cumbersome, but I do not have the time to Benchmark the difference.
while ($string =~ s/<TR.+?([^\)>]+\))<.+?(\d+\.\d+)//s) { print "$1 -- $2 \n"; } <TR <-- locates the start of each row. .+? <-- will slurp up lots of chars, but not greedy ([^\)>]+\)) <-- will grab the currency name, $1 <.+? <-- slurp more, not greedy (\d+\.\d+) <-- will grab the currency value, $2
I hope this is some help.
Edit 2001-04-20 by tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: simplifying an expression
by Sifmole (Chaplain) on Apr 20, 2001 at 16:39 UTC |