note
Polyglot
I appreciate the link, but that resource only tells how to work with a known quantity. I need to be able to match a variable number, conditional upon its relative value when compared to another number. In essence, I need to match based on the comparison result.
<p>
For example, how would one do something like this?
<code>
$string = "I have 5 apples, 6 oranges, and 8 limes.";
#Match the oranges only if they are more than the apples
#and fewer than the limes.
$string =~ m/(\d+)\sapples.*(\d+)\soranges.*(\d+)\slimes(?{if (($1<$2) && ($2<$3))})/g;
</code>
If I had something like that I could then plug in $var for $2.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-644375">
<p>Blessings,
<p><i>~Polyglot~</i>
</div></div>
996728
996746