Hey! guys, I got one tough question that I can't figure it. Hope your guys lend me a hand.

Here the cenario:
I've a data file that will store a fews hundred line of data and the data is look like below:

Item01=100,3;101,4;101,4.5;101.8,3
Where:
Item01 mean the Line description
The value after "=" sign is the X,Y coordinate seperate by semi-colon (delimiter)
100,3
101,4
101,4.5
101.8,3

What is the best algorithm to calculate the line build up from those X,Y coordinate after the
"=" sign is fall inside or outside the given rectangular as below:

Rectangular No.1 with (99,5)-(102,2)
Upper Left value (99,5)
Lower Right value (102,2)

and Rectangular No.2 with (100,5)-(100.5,4)
Upper Left value (100,5)
Lower Right value (100.5,4)

NOTE:
You're not allow to split those X,Y coordinate.


Regards,
Chris.C