Applied patches made to get this working on my system
Wrote the AM Probability regex function