-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 0 replies
- 1 view
-
- 2 replies
- 4 views
-
Microsoft announces .NET 8 Preview 1, available to download today
By Chasethebase,
- 1 reply
- 4 views
-
- 3 replies
- 4 views
-
Visual Studio 2022 17.4 for Windows x64, Mac, and Arm64 is now available, .NET 7 in tow too
By Usama Jawad96,
- microsoft
- visual studio
- (and 8 more)
- 7 replies
- 2 views
-
Question
wrack
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
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 :)
Link to comment
Share on other sites
13 answers to this question
Recommended Posts