Hi,

I have a set of sentences and need to weed out the bad ones and then extract the left part (the sentence) and the right part (number of minutes).


A is on phone from last 15min
B is on phone with A from last 15min
D is ready to talk to C now
D is 1min closer to talk to C now
E is waiting for D forever
F is waiting for G to pick up phone from last -12min
F is waiting for G to pick up phone from last 42min
F is waiting for G to pick up phone from last min
F is waiting for G to pick up phone from last -12 min
F is waiting for G to pick up phone from last 0 min
G will speak to F later


Rules
  • The sentence must end with either the number of minutes (i.e. "42min") or the word "now"
  • There must be at least 1 space before the number of minutes (i.e. "WHAT EVER THE SENTENCE IS 42min")
  • There cannot be any space between the the number of minutes and the word "min" (i.e "42min" is ok, "42 min" is not ok)
  • The number of minutes must be more than 5
  • Apart from the "42min" at the end, the rest of the sentence should not contain any numbers

So from the above set,

YUPS : A is on phone from last 15min
YUPS : B is on phone with A from last 15min
YUPS : D is ready to talk to C now
NOPE : D is 1min closer to talk to C now
NOPE : E is waiting for D forever
NOPE : F is waiting for G to pick up phone from last -12min
NOPE : F is waiting for G to pick up phone from last 42 min
NOPE : F is waiting for G to pick up phone from last min
NOPE : F is waiting for G to pick up phone from last -12 min
NOPE : F is waiting for G to pick up phone from last 0min
NOPE : F is waiting for G to pick up phone from last 0 min
NOPE : G will speak to F later


This is what I have come up with but it is not giving me the desired result and I am stuck. Any help is appreciated.

http://www.regexr.com/39dj6

Cheers