Okay -- the data sample in the OP had only integer values, so I didn't try to accommodate decimal points or minus signs. To handle that, just expand a bit on "\d" in the regex:
/\[ #open sq bracket ((?:\s*[-.\d]+){3}) #match 3 numerics, incl. decimal point and/o +r minus sign , ((?:\s*[-.\d]+){3}) \] /gx
The square brackets (not escaped by backslash) define a character class, consisting of the dash, the period and any digit. Note that the dash needs to be first or last inside the brackets in order to be treated as a literal dash; if it were in the middle between to other characters, it would define a range of characters (e.g. <code> a-z </code which matches all lower-case letters).

You can definitely benefit from reading the perlre and perlretut man pages. Please do that.

update: Actually, looking at your more detailed data sample, it looks like the regex given above won't work -- there are a lot more sets of numerics between a given pair of square brackets. I'm afraid I don't understand how that many sets of values can constitute a single "Coordinate". If you need more help, you first need to be more clear about how the data are supposed to be interpreted, and what you really intend to do with the sets of values that are given to you that way.


In reply to Re^3: accessing specific data in a file by graff
in thread accessing specific data in a file by phoenixQueen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.