For a long time I can not parse a string, such as (h or v)? ((double double double double) or ((double, double) (double, double)))
eg:
- h 1 1 100.5 100 (as a result, S = 'h', x1 = 1, y1 = 1, x2 = 100.5, y2 = 100)
- v 1,1 100,100.5
- 1.1 100.5,100 (as a result, S = defaultS, point1 = (1,1), point2 = (100.5,100))
- 1 1 100 100.5
"((h|v) )?(\d+(\.\d+) \d+(\.\d+) \d+(\.\d+) \d+(\.\d+))|(\d+(\.\d+)\,\d+(\.\d+) \d+(\.\d+)\,\d+(\.\d+))"but need to be tested - AgentFire$, then the last 4 numbers are guaranteed to fall into groups 2-5, and whether optional group 1 will depend only on the text. - ReinRaus