I don't know how you wish to use the data but to split out each charac +ter group (Except "UFOFH")into an array try this snippet $_='UFOFH 33603 01231 /0000 0024/ 1024/ 2025/ 3027/ 4030/ 5025/ 6028/ +7060/ 8081/ 9098/ 0110/ 1107/ 2106/ 3102/ 4080/ 5065/ 6057/ <\p>'; my @mailbox=( m#([0-9//]{5})#g); for my $i (0 .. $#mailbox) { print "mailbox[$i] => $mailbox[$i]\n"; }; which results in mailbox[0] => 33603 mailbox[1] => 01231 mailbox[2] => /0000 mailbox[3] => 0024/ mailbox[4] => 1024/ mailbox[5] => 2025/ mailbox[6] => 3027/ mailbox[7] => 4030/ mailbox[8] => 5025/ mailbox[9] => 6028/ mailbox[10] => 7060/ mailbox[11] => 8081/ mailbox[12] => 9098/ mailbox[13] => 0110/ mailbox[14] => 1107/ mailbox[15] => 2106/ mailbox[16] => 3102/ mailbox[17] => 4080/ mailbox[18] => 5065/ mailbox[19] => 6057/
Ay_Bee
-_-_-_-_-_-_-_-_-_-_-_- My memory concerns me - but I forget why !!!

In reply to Re: Regex matching by Ay_Bee
in thread Regex matching by Anonymous Monk

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.