Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-25 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found