Morrff
08-07-2009, 05:01 AM
Is it possible through Ruby to catch two matches in the same line?
An example for instance would be. Matching the two bold parts.
Gaedrein examines the bundle of griffin talons quickly and says, "I'd say it's worth about oh... I'll pay you 5349 silvers for it."
This isn't what I'm attempting to match, but the example will do. I want the script to trigger on the first match and then grab the #'s and calculate them.
example
If (?) < 5349 then goto whatever
else
If (?) > 5349 then goto otherwhatever
If someone can show me how to do this action in Ruby that would help what I'm doing a ton. I'll also post the script for everyone to use once I'm done.
An example for instance would be. Matching the two bold parts.
Gaedrein examines the bundle of griffin talons quickly and says, "I'd say it's worth about oh... I'll pay you 5349 silvers for it."
This isn't what I'm attempting to match, but the example will do. I want the script to trigger on the first match and then grab the #'s and calculate them.
example
If (?) < 5349 then goto whatever
else
If (?) > 5349 then goto otherwhatever
If someone can show me how to do this action in Ruby that would help what I'm doing a ton. I'll also post the script for everyone to use once I'm done.