in reply to Re: simplifying an expression
in thread simplifying an expression

Sorry! I have no idea how my posting ended up in the primary area. I beg your pardon.


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