I have FULL CONFIDENCE of lending you a hand in sorting out your Regular Expressions problem and I am ready to start IMMEDIATELY.
QUESTIONS/COMMENTS
1) It will be much beneficial if you can upload a small sample of [login to view URL] property that you are going to parse. I am asking this because I think it will contain contents of multiple text elements and I can clearly see what you mean by proximity.
2) Exactly what do you mean by text element? As I see it in attached image, there are 3 "figures" joined by dashed arrows. 1st figure contains 240-TE-24381, 2nd figure contains 240-TT-24381, and 3rd contains 240-TI-24381. Does the "figure" (e.g. 240-TE-24381) corresponds to a text element or individual parts within the figure, viz. 240, TE, 24381, constitute a text element?
3) I have not followed how X or Y offsets are related to RegExes. Please explain.
EXPERIENCE
Although new to Freelancer.com, I have EXTENSIVE experience in Regular Expressions and I am pretty much familiar with the RegEx “flavour” as implemented in .NET. Thus, I know that named capturing groups in .NET use (?<id>\w+) or (?'id'\w+) format while the syntax for named capturing groups is (?P<id>\w+). In addition to “regular” concepts such as Character classes, Anchors, Word boundaries, etc. I am also very much at home with concepts such as Atomic Grouping, Lookahead and Lookbehind.
Thanks,
Tushar